DEV Community

Discussion on: Order of arguments in HOF

Collapse
 
kenbellows profile image
Ken Bellows

As @leob said, I think it's a bit more intuitive for folks used to Object Oriented practices to put the data first. However, I have often wished that lodash functions worked data-last, because it makes currying more straightforward when you want to pass functions like _.at or _.pick into an array .map call.

Fortunately, lodash has a separate module made just for this, their functional programming library, lodash/fp. It's super handy, though I wish it was a bit more thoroughly documented