Re:A Gentle Intro to Monads … Maybe?
by rogerallen on Friday January 17, 2014 @11:43AM
(#7076702)
Suggestion for the author. Reformat the code of your translated example. I truly found it impenetrable until I formatted it more like idiomatic d3.js code. With this reformatting, I'll buy that it is less annoying and tedious than the original.
And then I realized that d3.js code is monads! (shout it like Charlton Heston in Soylent Green)
[ Parent
| on HN ]
I'm not sure this is actually using the fact that maybe is monadic - I think this much can be done with applicative functors. In order to really be monadic, you'd need to run the next bind inside the function passed to the previous bind.