@wycats anytime I have a datatype that has a Monad instance and one of those functions matches the type I want, I can use it.
@bitemyapp but does it describe what Monad is often useful for?
-
-
@wycats Not often, only a couple instances popular in languages that rarely pull it off convincingly. -
@wycats and even then, it's a pretty bad explanation of, say, Maybe. -
@wycats Maybe itself deals with the concept of Nothingness, Monad is just a convenient interface over the data structure. -
@bitemyapp It's a possibly-nothing that is part of the type interface of your functions, instead of an implicit global protocol. -
@wycats hum, the possibly nothing bit is in the datatype, not the interface. data Maybe a = Nothing | Just a -
@wycats and I doubt you mean the church-encoding, so... -
@bitemyapp null is a global protocol. Maybe is local. -
@wycats null is a un-value'ish value, Maybe is a data structure that bears values or possibly nothing at all. - 4 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.