Skip to content

Instantly share code, notes, and snippets.

@benolee
Created July 23, 2014 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benolee/fdfb395a05da6cff6dc2 to your computer and use it in GitHub Desktop.
Save benolee/fdfb395a05da6cff6dc2 to your computer and use it in GitHub Desktop.

monads are an abstraction

objects are an abstraction

They're two very different abstractions :-)

In my opinion, monads are much simpler than objects.

Because monads are only abstractions of structure, where you get to change the meaning yourself.

Monads only do two things, put stuff in a container, and put together two containers.

And they have some 3 laws that mean you can always put together containers consistently.

return is "put in container", and bind is "put together two containers".

But none of that helps at all until you know what this particular monad means to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment