Dear Father, forgive me, for I have sinned. I just tried to explain monads to someone on the Internet.
@robotlolita @steveklabnik @samth that suggests they are used in a quite monadic way, whatever we decided.
-
-
@robotlolita@steveklabnik@samth the exception is that you cannot have a Promise for a Promise, but that's it. -
@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 -
-
-
@wycats@steveklabnik@samth That just suggests they could have a monad instance. Like any of the other examples. -
@robotlolita@steveklabnik@samth maybe I misunderstood what you meant by "used as monads in JS" -
@wycats@steveklabnik@samth Oh, sorry. I did not want to imply "used as something that could be made a monad" :( -
@robotlolita@steveklabnik@samth I thought you meant "used in a monadic style"
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.