Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

OUR TIME HAS COME

Name: Anonymous 2008-12-05 20:29

Name: Anonymous 2008-12-05 22:09

>>4
You could do IO without nomads, but it was less powerful and had some big problems. Before nomads, Haskell had (IIRC) main :: [Response] -> [Request] or something like that. Nomads just provide the structure for effectively combining and sequencing computations.

This explains how the IO monad came to be and how it works:
http://www.stanford.edu/class/cs242/slides/IO.ppt
http://66.102.9.132/search?q=cache:zl09j-97JUgJ:www.stanford.edu/class/cs242/slides/IO.ppt (HTML version with mangled diagrams)

Monads have also been described as like overloading the ';' in C++, if that were possible. For example, the IO monad's version executes the IO t from the previous computation and passes its result to the next computation. In the Maybe monad, the computations following the ';' aren't performed if the previous computation failed. In the list monad, the following computation is performed for every item in the list returned by the computation before it.

Maybe monads do suck donkey balls, but I still think they're better than the stream version. (I know nothing about uniqueness types, so I shall not comment on those.)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List