DEV Community

Pure functions, and why I like them.

Nimmo on September 17, 2017

Pure functions are not new. This isn't a new concept by any means at all, and this certainly isn't the first post anyone has written about 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 :-)