quark icon indicating copy to clipboard operation
quark copied to clipboard

Allow arity exceptions on defpartial

Open expede opened this issue 10 years ago • 0 comments

Should be able to do things like this...

defpartial minus(a, b, c), except: 2, do: a - b - c
defpartial together(a, b, c, d), except: [2,3], do: a <> b <> c <> d

defpartial plus(a, b, c), only: 2, do: a + b + c
defpartial times(a, b, c), only: [1,2], do: a * b * c

...and have it generate or exclude the arities specified.

Once that this the case, we can consider merging Quark.Partial into Quark.Curry, as we won't have the "all arities" problem.

expede avatar Jan 02 '16 20:01 expede