Having to specify which functions are curried is not a problem for me, because I mostly use it for combinators, but this simple macro does not integrate with defm or pat-m (yet).
(defc flip (fun a b)
(fun b a))
(defc times (n f)
[do (repeat n (zap f _)) _])
((flip times cdr) 4 '(a b c d e))
=> (e)
;(flip times cdr) is nthcdr
these examples should work with drcodes currying too, just use def instead of defc.
> but this simple macro does not integrate with defm or pat-m (yet).
It doesn't have to: the 'p-m modifier will adapt to it. All it needs is an args . body somewhere at the end of your macro's arg list - which you do have. p-m will then be able to adapt.
All patterns would have to be of the same length, and ideally they should be ll(1) patterns, so they could dispatch on the first arg. Or should the pattern matching occur after the function got all of its arguments?
What I would really like to see is currying with partial function application and dispatch on every function argument, so that (my-curried-fun (annotate 'foo val)) is evaluated to a curried function for the type foo. Otherwise the (types|patterns) would have to be compared everytime this function is applied, which may be inefficient, e.g in