summaryrefslogtreecommitdiff
path: root/monad
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2016-01-28 13:29:42 -0700
committerJoe Zhao <ztuowen@gmail.com>2016-01-28 13:29:42 -0700
commita4db990a8b14f7b3fc97c1d1eda96db9f890e2d5 (patch)
treecb60e66910b73e3e87380968bab7198572e82bf7 /monad
parent9d9cfd3c2f7ab36982cb569027cf831e95ee42ea (diff)
downloadhaskbox-master.tar.gz
haskbox-master.tar.bz2
haskbox-master.zip
Diffstat (limited to 'monad')
-rw-r--r--monad/wri.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/monad/wri.hs b/monad/wri.hs
new file mode 100644
index 0000000..93a0527
--- /dev/null
+++ b/monad/wri.hs
@@ -0,0 +1,8 @@
+import Control.Monad.Writer
+
+example :: Writer [Int] String
+example = do
+ tell [1..5]
+ tell [6..10]
+ return "foo"
+