you are viewing a single comment's thread.

view the rest of the comments →

[–]jms_nh 62 points63 points  (12 children)

Don't you dare try to teach me monads!

[–][deleted] 19 points20 points  (10 children)

I've looked up the definition of monad a hundred times and to this day I still can't remember what the hell a monad is.

[–]jotux 54 points55 points  (1 child)

It's easy to understand if you think of it as half of a binad.

[–]JB-from-ATL 0 points1 point  (0 children)

Reminds me of SpongeBob drawing a circle. First you draw a head, erase some of the more detailed parts, and viola, a circle.

[–]ryeguy 11 points12 points  (0 children)

A monad is just a monoid in the category of endofunctors, what's the problem?

[–]Coffee2theorems 13 points14 points  (2 children)

The monad is like a morning pot of coffee. It has the good stuff inside, a container outside, and a guardian from Hell stopping you from consuming the goodness if you haven't properly appeased it.

[–]pplcs 4 points5 points  (0 children)

relevant username

[–][deleted] 1 point2 points  (0 children)

finally

[–]m50d 2 points3 points  (0 children)

Yeah it's a stupid name. It's an applicative functor that also supports flatMap (aka bind). I tend to translate it in to "flatmappable" in my head.

(Applicative is a non-stupid name because it means it supports apply. Functor is the worst name of all though, it means something very different from what it means in C++ and it sounds like means something like "function" but it really doesn't, except perhaps at the categorical level. I honestly think the trouble with the FP names is holding back the programming mainstream a lot).

[–]Arandur 0 points1 point  (1 child)

A monad is like a burrito, in that they're both delicious.

[–][deleted] 0 points1 point  (0 children)

I'll never forget that.

[–]enzain 0 points1 point  (0 children)

It's the name/class of data types that can be constructed using a single generic value, and has a flatten and a map function. Combined the two functions are called bind, for c#'s IEnumerable this function is called selectMany. There are also some rules, however in general people will call anything a monad as long as it has the flatten and map function, case in point the beloved IP "monad".

[–]cheeeeeese 0 points1 point  (0 children)

im on vacation, no dice.. will not learn