|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file:
-- http://angg.twu.net/HASKELL/MyMonad1.hs.html
-- http://angg.twu.net/HASKELL/MyMonad1.hs
-- (find-angg "HASKELL/MyMonad1.hs")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun m () (interactive) (find-angg "HASKELL/MyMonad1.hs"))
-- (defun o () (interactive) (find-angg "HASKELL/Applicative1.hs"))
-- (defun mo () (interactive) (find-2a '(m) '(o)))
--
-- https://wiki.haskell.org/Monad
-- https://wiki.haskell.org/Monad_tutorials_timeline
-- https://wiki.haskell.org/Research_papers/Monads_and_arrows
--
-- (find-es "haskell" "liftM2")
class MyFunctor f where
myfmap :: (a -> b) -> f a -> f b
class MyFunctor f => MyApplicative f where
mypure :: a -> f a
myap :: f (a -> b) -> f a -> f b
class MyApplicative m => MyMonad m where
myreturn :: a -> m a
myreturn = mypure
mybind :: m a -> (a -> m b) -> m b
{-
* (eepitch-ghci)
* (eepitch-kill)
* (eepitch-ghci)
:load MyMonad1.hs
-}
-- Local Variables:
-- coding: utf-8-unix
-- End: