eliperelman/fn.js — pull request #15 by dillonforrest (2014-03-09 21:54:28+00:00)
Title: Add fn.curryRight

Addresses #9.

Even though @eliperelman and I discussed using `fn.flip`, I ended up using `fn.reverse` on the arguments. I know this leads to more code, but please hear me out. :)

After I wrote my fail-first tests, I implemented `fn.curryRight` simply with this:

```javascript
fn.curryRight = fn.flip(fn.curry);
```

Due to the recursive nature of `fn.curry`, this simple use of `fn.flip` didn't work. To make all my tests pass and enable the same recursive functionality, I had to basically duplicate the code in `fn.curry`. So the advantage to using `fn.reverse` with all the additional code is that `fn.curryRight` behaves as expected. The disadvantage is that the code is no longer dry, and that makes me sad.

I'm happy to resubmit my pull request if you're okay with me abstracting out the recursive `curry` function inside `fn.curry` so that we can reuse it in both `fn.curry` and `fn.curryRight`.

Otherwise, I tried my best to stay within the pre-existing style, including using tabs over spaces.

What are your thoughts?