Monad - FunFunFunction #21

Channel:Fun Fun Function · Length:11:25 · Published:2016-02-29 · Views:127777

Watch on YouTube

Summary

An episode of FunFunFunction explaining monads in JavaScript as functors that also implement flatMap. It builds on the preceding functor episode and works through code examples.

Why HN recommends it

Recommended to people confused by monads as a friendly, practical explanation for JavaScript developers, with one commenter saying it finally made it click.

I saw a video by MPJ/Funfunfunction [0] and it finally made sense. — HN, 2021

Functional programming · Web development

Subtitles (excerpt)

good Monday morning I'm mpj and this is fun fun function today we are going to explore monads monads is a type of functor so you need to know what a funter is before watching this episode or it's not going to make sense thankfully there is a fun fun function episode for that which you can watch here a disclaimer a lot of the material out there on the into webs talking about MO ad is very picky on the details talking about the exact monad laws and uh how the monad is implemented in hasle and I think that doing it with that level of detail and correctness is going to cause you to not see the forest for all the trees so we're not going to do that in this video instead I'm going to try to make you get a sense of what the monut is and how it's used so our objective here is to make you get the monad not try to get every detail right because you can learn that later once you've gotten the monad so what is a monad do you remember that funter is something that implements map a monad is a more powerful functor that also implements flat map that's the main thing about the monad which begs the question what the hell is flatmap what is flat map good for what is flat about flat map before we get to that I'm going to show you a little bit of code

On Hacker News

I read this example years ago, and it didn't clear anything up for me. After half a year of trying to understand monads, I saw a video by MPJ/Funfunfunction [0] and it finally made sense. [0] [VIDEO] — k__, 2021-10
Here's a half baked explanation, as in just the flatmap part. map is understood in javascript. So you 'just' need to make the leap to flatmap. Which is mapping something and flattening the result. So still you need to learn is what flatten is. But that's not too hard to learn. Try the funfunfunction video [0] [0]: [VIDEO] — icc97, 2018-02
I like how mpj explains it. Monad - FunFunFunction #21 [VIDEO] Furthermore, the creator of Elm has a fun explanation too. Evan Czaplicki - Let's be mainstream! User focused design in Elm - Curry On [LINK] More serious computer scientist explains monads in the following. Erik Meijer: Functional Programming [LINK] and here too [LINK] — intellectable, 2016-07
A nomad is something that goes "nom!" ;) A monad is basically an function, in the algebra sense, that will take a set of input, and map it to a different output. That's the most simple definition I can give without getting into the math, and it's been a minute since I've really gotten into Group theory. Maybe through a Haskell tutorial for some hands-on guidance? [LINK] [VIDEO] — cosinetau, 2017-03

Related videos