Dear Father, forgive me, for I have sinned. I just tried to explain monads to someone on the Internet.
-
-
@wycats@steveklabnik@samth And that is enough to make it not a monad. You can call it "monad-ish", but you lose the monad benefits -
@robotlolita@steveklabnik@samth you lose them for a subset of types, but retain them otherwise. -
@wycats@steveklabnik@samth sure, but that breaks e.g.: `sequenceM`, if you want to write it. The laws are important for abstraction/comp -
@robotlolita@steveklabnik@samth yes but there's a spectrum of "losing the benefits" -
@wycats@steveklabnik@samth in the case of monads, I'm not sure there are any benefits besides generic fns/composition, though. -
@robotlolita@steveklabnik@samth usually I think of the point of monads as encapsulating some effect that is usually non-local - 54 more replies
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.