DEV Community

Discussion on: Pure functions, and why I like them.

Collapse
 
rasmusvhansen profile image
rasmusvhansen

Nice.
A curried version of isOverLimit would be even nicer though. Then you could define
isOverGoldLimit = isOverLimit(1000)

Collapse
 
nimmo profile image
Nimmo

Sure, but the example would be more complicated for anyone who isn't familiar with basic FP concepts, and this was intentionally as basic as possible. :-)

Collapse
 
rasmusvhansen profile image
rasmusvhansen

Good point :-)