summaryrefslogtreecommitdiff
path: root/snip/snip.hs
blob: 532329fe8d05a80e157a330ffeed22366e2644e9 (plain)
1
2
-- monad transformers in action
Main Control.Monad.Writer Control.Monad.State> runState (runWriterT  (get >>= \a -> tell ["foo"] >> put (a*a) >> tell ["bar"] >> tell [show a])) 5