summaryrefslogtreecommitdiff
path: root/monadTrans
diff options
context:
space:
mode:
Diffstat (limited to 'monadTrans')
-rw-r--r--monadTrans/h1.hs2
-rw-r--r--monadTrans/h2.hs4
2 files changed, 6 insertions, 0 deletions
diff --git a/monadTrans/h1.hs b/monadTrans/h1.hs
new file mode 100644
index 0000000..0127e8c
--- /dev/null
+++ b/monadTrans/h1.hs
@@ -0,0 +1,2 @@
+-- Kind of t in MonadTrans t
+(* -> *) -> * -> *
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)