Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But for a functional library it has strange argument ordering.


There's a variant of lodash with auto-currying and better argument ordering: https://github.com/lodash/lodash-fp

I haven't tried it, but it looks like it could basically replace Ramda (although I feel that Ramda might contain even more FP oriented functions).


After a little bit of use, I feel like lodash-fp is limited by being a simple adaptation of lodash. Lodash's API is designed around variadic functions, which doesn't really work with autocurrying, so a bunch of important options and functionality is lost. On the other hand, working with Ramda makes me miss some of the flexibility of lodash - e.g., not having to use a different map() for arrays and objects.

The optimal functional utility library would be designed with autocurrying in mind from the start, but not shy away from flexibility where it makes sense.


Open an issue (https://github.com/lodash/lodash-fp/issues) for the options you'd like and we'll add alternative API to cover the arguments required.

lodash-fp does this for max, min, & uniq by offering maxBy, minBy, & uniqBy.


I see. Nice :)

My library of choice is http://www.preludels.com


prelude-ls really shines when combined with LiveScript - syntactic support for partial application, currying, function composition, "pipelining" (|>), implicit arguments and so much more really make a difference.

I started writing a comparison between un-sugared JS and LS use for functional programming patterns, here: https://klibert.pl/warsawjs-talk/code.html (for the talk I gave: https://klibert.pl/warsawjs-talk/).

That being said, I'm very interested in mori, immutable-js or lz.js. prelude-ls is nice, but is designed to work with native JS types and provides no extended semantics that I'd find useful. It's still my go-to library when working on the frontend and it probably will remain one, but I'm thinking about contributing some support for other advanced collection types to it.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: