[Haskell-cafe] Wow Monads!

David McClain dbm at refined-audiometrics.com
Mon Apr 17 06:51:06 UTC 2017


That was absolutely excellent !! Great video presentation by Douglas Crockford. It took me about 2 hours to slowly advance through it, stopping along the way to translate his JS into Lisp to try out the Monads. 

This is by far the clearest explanation of Monads that I have seen, from among at least 2 dozen different videos and blogs. Even clearer than that Wadler paper. I highly recommend viewing this presentation. 

As for the rest of them, I hearken to the words of another great scientist who once stated that:

“If you can’t explain a problem to your grandmother so that she understands it, then you don’t really understand the problem yourself…"

- DM

>> On Apr 16, 2017, at 15:43, MarLinn <monkleyon at gmail.com> wrote:
>> 
>> On 2017-04-16 03:13, John Wiegley wrote:
>>> MD> Anyone else have Lisp experience using Monads? Did it offer some major enhancements for you?
>>> 
>>> In Lisp, I don't think the abstraction buys you much, because all the functionality you need (state, exceptions, runtime, etc) are always available to all expressions. They become an excellent way of representing "extensible composition" in a pure language that otherwise could not allow those things, but I don't see that you need it for an untyped language like Lisp.
>> 
>> May I present to you the lecture "Monads and Gonads" by Douglas Crockford (https://www.youtube.com/watch?v=b0EF0VTs9Dc). He shows that monads can make even a language like JavaScript useful (not his words). And the talk is one of the better monad tutorials out there to boot, not least because it's different from all the others.
>> 
>> My own conclusion from it is that I would maybe even turn your argument around and claim that especially a language that has as few tools to keep programs sensible as JS can benefit greatly from the structure a monad provides. The benefits will be different for Lisp, but I imagine there might be some nice use cases as well. After all, structures are a great tool even if you're not forced to use them. ;)
>> 
>> On another note: the more I work with monads and their brethren, the more I find myself thinking in terms of (a -> f b) functions instead of things like bind. Not only is it closer to the mathematical basis, but there's also the close relationship to lenses. I mention this because my feeling is that this type of function is a more usable puzzle piece in languages with limited syntax support. Especially if you also implement functors. But that's just unsubstantiated gut feeling.
>> 
>> Cheers,
>> MarLinn
>> 
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>> Only members subscribed via the mailman list are allowed to post.
> 



More information about the Haskell-Cafe mailing list