News for hackers. Stuff that matters.
Re:Testable IO in Haskell by wz1000 on Sunday June 21, 2015 @06:57AM (#9752925)
State is modeled in Haskell as the type

    newtype State s a = State (s -> (a, s))
Where s is the type of your state and a is the type of your result. It's basically a function that takes the current state and gives you a result as well as a new state.

There are no comments on this comment yet.