summaryrefslogtreecommitdiff
path: root/monadTrans/h2.hs
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2015-08-24 15:45:45 -0600
committerJoe Zhao <ztuowen@gmail.com>2015-08-24 15:45:45 -0600
commit6588473adf96a3eb7cfac55820ec022d4533fcbf (patch)
treedcc6d21e7ce8ed368eda73a7fd74eca5340355ed /monadTrans/h2.hs
parent3cf3e36b1498271f3c9162576809d886482e6d97 (diff)
downloadtypeclass-master.tar.gz
typeclass-master.tar.bz2
typeclass-master.zip
FoldablesHEADmaster
Diffstat (limited to 'monadTrans/h2.hs')
-rw-r--r--monadTrans/h2.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/monadTrans/h2.hs b/monadTrans/h2.hs
new file mode 100644
index 0000000..b74c1e1
--- /dev/null
+++ b/monadTrans/h2.hs
@@ -0,0 +1,4 @@
+-- Implement join :: M (N (M (N a))) -> M (N a), given distrib :: N (M a) -> M (N a) and assuming M and N are instances
+-- of Monad.
+
+join a = fmap join (join $ fmap distrib a)