Just saw as JS lib `partial.lenses` highly inspired by Haskell in a Stack Overflow question. Cool, I like that you see the benefit of FP, but please DON'T go down this route. That code is SO difficult to read and understand. IF you want optics & guarantees, I implore you to stop trying to make JS like Haskell and either use GHCJS or PureScript (or Elm) and be done with it. It's very hard for people to grok & you bring little safety outside of the lib being pure functions. Get it first-class, not bolted on.


If your employer allows this level of convoluted code, they will appreciate the first-class bit as well since you can still integrate with existing JS code.

And stop using Lodash with this madness since it's soo lacking in functions compared to the myriad of FP JS libs along with wrong argument order, etc.

Sign in to participate in the conversation

cybrespace: the social hub of the information superhighway

jack in to the mastodon fediverse today and surf the dataflow through our cybrepunk, slightly glitchy web portal