Dear Father, forgive me, for I have sinned. I just tried to explain monads to someone on the Internet.
-
-
@wycats@steveklabnik None of those are used as monads in JS, or even have a monadic instance (although they could have) -
@robotlolita@steveklabnik What do you mean by "used as monads"? -
@wycats@steveklabnik people don't define flatMap/join/unit on them and use those operations when working with them. -
@robotlolita@steveklabnik they are required to have those names? -
@wycats@steveklabnik No. They're only required to have equivalent types and follow the monadic laws. Which none of those examples do. -
@robotlolita@steveklabnik promises are so close to monads, and used that way, that@samth felt strongly they should just BE 100% monadic -
@wycats@steveklabnik@samth They should, yes. But after a lot of discussion TC39 decided to just go with the overloaded .then, which is sad -
@robotlolita@steveklabnik@samth that suggests they are used in a quite monadic way, whatever we decided. - 61 more replies
New conversation -
-
-
@steveklabnik a wrapper around a value that you can unwrap, do some shit, and rewrap isn't so hard to understand :) -
@wycats@steveklabnik so ...basically monads are like... re-gifting? :-p
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.