BookmarkSubscribeRSS Feed



Jul 30, 2015

MFR: a Functional Programming Library for JSL

I developed this helper library while I was working on a large JSL framework. After coding the n-th For() loop to traverse a list (and fixing that many bugs related to unintended clobbering of the index variable) I realized that the code would look a lot cleaner (and be easier to maintain) if I used higher-level abstractions like the ones commonly used in Functional Programming.

The library implements the trio map/filter/reduce, available in languages like Python and JavaScript, plus a few more like apply, reduce and compare. It was inspired by

Check the tests for usage examples and let me know if you find a bug or a way to improve it!

Article Tags