CrowdHailer / fn.js

A JavaScript library built to encourage a functional programming style & strategy. - http://eliperelman.com/fn.js
MIT License
399 stars 30 forks source link

Is fn.js compatible with the Fantasy Land specification? #18

Closed cgarciae closed 10 years ago

cgarciae commented 10 years ago

Guys at Fantasy Land made a specification for Algebraic objects in JavaScript. https://github.com/fantasyland/fantasy-land

It helps a lot to understand how to organize objects so the library can act upon them, its also good that teaches functional programming concepts. However, they have no documentation for their modules. I would like to know if this library is compliant so I can read the concepts there and but use the functions over here.

Thanks!

eliperelman commented 10 years ago

@cgarciae I really like the topic that fantasy-land has presented there. I believe that monads and functors are an important part of functional programming in JS, so much so that I had started implementation on many of those functions in the initial release of fn.js. Unfortunately the scope was very large and I wanted to get something usable out in the open, and I removed that stuff from the core.

I would love to see this functionality make it into the core of fn.js and will open an issue to track it. Technically the concepts presented there should be possible, with the exception that their basis is often made from stateful objects which I would avoid using with fn.js.

eliperelman commented 10 years ago

Closing this as there currently is no monadic or functoral methods in fn.js. To be implemented with #19.