IO |
|
Recall that (IO τ) is a
Monad
(s.7.2 pp.99 RR),
so that >>, etc. are applicable to it.
The " main program", main, must be of type
main = putStr "Hello " >> putStr "World." --------------- --------------- IO () IO () ---------------------------------- IO ()
In input step passes a value on to the next step after >>= ... getChar >>= putChar ... ------- ------- IO Char Char->IO() ----------------------- IO ()
RR = revised report, CUP, 2003. 7/2002, 11/2005 |
|
↑ © L. Allison, www.allisons.org/ll/ (or as otherwise indicated). Created with "vi (Linux)", charset=iso-8859-1, fetched Friday, 19-Apr-2024 08:06:27 UTC. Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off. |