From fec672748d0e4ccf76b6631e81c0ae941f54ea7f Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 17 Mar 2019 12:13:01 +0100 Subject: added snippets --- snip/snip.hs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 snip/snip.hs (limited to 'snip') diff --git a/snip/snip.hs b/snip/snip.hs new file mode 100644 index 0000000..532329f --- /dev/null +++ b/snip/snip.hs @@ -0,0 +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 -- cgit v1.2.3