elementerl/iron — pull request #10 by msassak (2013-03-17 03:18:15+00:00)
Title: Basic papply/2

Here's a better `papply`, I think and hope. It contains two pieces of syntactic sugar:

1. 1-arity function arguments return a 0-arity function
1. 2-arity function arguments return a 1-arity non-list function

Function arguments with arities higher than 2 must be given a list of arguments, just like apply. The tests should make this a little clearer. I'm on the fence about 2.., but I liked it enough to add it. Thoughts definitely appreciated!

It's really a shame that we can define an anonymous function by creating a data structure so this sugar wouldn't even be an issue. If we could write a parse transform to enable *that*, I'd be all for it. Not sure how much work it would be though.