diff options
| author | Joe Zhao <ztuowen@gmail.com> | 2015-08-24 15:45:45 -0600 |
|---|---|---|
| committer | Joe Zhao <ztuowen@gmail.com> | 2015-08-24 15:45:45 -0600 |
| commit | 6588473adf96a3eb7cfac55820ec022d4533fcbf (patch) | |
| tree | dcc6d21e7ce8ed368eda73a7fd74eca5340355ed /monad/h2.hs | |
| parent | 3cf3e36b1498271f3c9162576809d886482e6d97 (diff) | |
| download | typeclass-6588473adf96a3eb7cfac55820ec022d4533fcbf.tar.gz typeclass-6588473adf96a3eb7cfac55820ec022d4533fcbf.tar.bz2 typeclass-6588473adf96a3eb7cfac55820ec022d4533fcbf.zip | |
Diffstat (limited to 'monad/h2.hs')
| -rw-r--r-- | monad/h2.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/monad/h2.hs b/monad/h2.hs new file mode 100644 index 0000000..fce9d81 --- /dev/null +++ b/monad/h2.hs @@ -0,0 +1,5 @@ +instance Monad ((->) e) where + return f = \_ -> f + (>>=) f1 f2 = \r -> f2 (f1 r) r + -- f1 :: m a + -- f2 :: a -> m b |
