September 2017
Beginner to intermediate
396 pages
9h 46m
English
stack new state-monad simple
import Prelude hiding (Either(..)) import Data.Functor import Control.Applicative import Control.Monad
data State s a = State { runState :: s -> (a, s) }
instance Functor (State s) where fmap f (State stateFunc) = let nextStateFunction ...
Read now
Unlock full access