pointfree-fantasy icon indicating copy to clipboard operation
pointfree-fantasy copied to clipboard

either.js missing

Open syzer opened this issue 11 years ago • 5 comments

Can you add either to instances? you have it in patterns_talk

BTW: +1 for pointfree

syzer avatar Aug 07 '14 13:08 syzer

I shall. In the meantime, I've been using folktale's data.either. I dig it very much.

For the most up-to-date stuff checkout: https://github.com/DrBoolean/hardcorejs/blob/master/demos/step4/flickr.js which uses: http://looprecur.com/hostedjs/v2/hcjs.js

DrBoolean avatar Aug 07 '14 17:08 DrBoolean

Should mention, we just threw things in there to reduce complexity for the class. But it's got most of what we use in client work as deps

DrBoolean avatar Aug 07 '14 17:08 DrBoolean

https://github.com/DrBoolean/hardcorejs/blob/master/demos/step4/flickr.js ramda is still to hardcore for me :) why not wu?

one comment on style: var _PictureBox ...

instead privates with _ AKA the blind-man oath: "I pretend not to see and call code with _"

one might return object/function wich exposes wanted api and push all _functions to closure , so they are really private

syzer avatar Aug 07 '14 18:08 syzer

ha nice. ramda and lambdajs expose a really nice curried api for doing pointfree stuff. Alternatively, lodash's chain and standard fantasyland api's turn into a scala-like approach.

I tend to gravitate toward pointfree, but i'm crazy like that.

The _ convention is totally lame. I typically do hide it and just expose the constructor, but in the class we used that convention throughout to flag the type vs the constructor so we could avoid using new while practicing implementing the typeclass interfaces.

DrBoolean avatar Aug 07 '14 18:08 DrBoolean

+1

syzer avatar Aug 07 '14 21:08 syzer