Is the short cut in allowing an element passed to rem be treated as a function worthwhile? Consider:
(def instab (a) (rem a (list a (uniq)))) Then this will always return a list containing one unique element, unless a is a function. arc> (instab [ is _ _] )
nil or even. arc>(instab (fn(x y) (is x y)))
Error: "#<procedure>: expects 2 arguments, given 1: #<procedure>" The reason I'm making a fuss is; I worry that if I start writing utility functions idiomatically and then treat functions as first class entities my code is going to break in surprising ways. The obvious work around is to split rem into 2 functions:
rem which must take a function and a list,
and
reme which takes an element to remove and a list as it's parameters. |