| I've been thinking a lot recently about a way to add currying and partial into Arc.. and I know I'm not the only one. After pondering <>, {}, a new [], and even other crazy stuff, I came to the conclusion that it would be really hard to add a currying without breaking the simplicity of Arc. However.. here's an idea: Why not make all Arc curry-able(?) by convention? (def-partial > (x y)
(<= y x))
(map (> 2) '(1 2 3 4 5)) -> (nil nil t t t)
And for some other cases of currying (not last position, more then one curry applied), we could still use our old [] friend: (map [> _ 2] '(1 2 3 4 5)) -> (nil nil t t t)
p.s. (< 1) returns t.. I guess it's because < is recursively defined and returns "t" when there is only one parameter. However, I think (< 1) returning (fn (x) (< 1 x) is way more useful then returning t.What does (< 1) even mean? Is 1 smaller? Yes. |