Arc Cross Reference


[procedure] testify x

If x is not a function, returns a function that tests the argument is the same as x. Procedures like some, all, mem, and find "testifies" the test predicate argument.

(def testify (x)
  (if (isa x 'fn) x [is _ x]))

(Comment: well... certainly it is a shortcut for common cases, but you have to treat specially if you want to deal with a list of functions... I hope it won't bite back later -- shiro)