Difference between revisions of "PFP Laboratory 8"

From Marek Běhálek Wiki
Jump to navigation Jump to search
(Created page with "== Monads == * Consider you have a type: <syntaxhighlight lang="Haskell"> newtype State s a = State { runState :: s -> (s, a) } </syntaxhighlight> Make this type the instance...")
(No difference)

Revision as of 08:11, 24 October 2022

Monads

  • Consider you have a type:
newtype State s a = State { runState :: s -> (s, a) }

Make this type the instance of Monad