Personal tools

Avoiding IO

From HaskellWiki

Revision as of 10:47, 25 December 2008 by Lemming (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Haskell requires an explicit type for operations involving input and output. This way it makes a problem explicit, that exists in every language.


1 Lazy construction

map putStr vs. putStr concat

2 State monad


3 ST monad

STRef instead of IORef, STArray instead of IOArray

4 Custom type class

example getText