summaryrefslogtreecommitdiff
path: root/snip
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2019-03-17 12:13:01 +0100
committerMiguel <m.i@gmx.at>2019-03-17 12:13:01 +0100
commitfec672748d0e4ccf76b6631e81c0ae941f54ea7f (patch)
treedd3fdd91bfedc11cb8bcbf2ddf7f50bf9ca925f8 /snip
parent9d1659957b81ba3655cc16e4d47426ca154b287b (diff)
added snippets
Diffstat (limited to 'snip')
-rw-r--r--snip/snip.hs2
1 files changed, 2 insertions, 0 deletions
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