Signed-off-by: Jim Pryor <profjim@jimpryor.net>
fun s -> M.bind (u s) (fun (a, s') -> f a s');;
let elevate (m : 'a M) : 'a stateT(M) =
- fun s -> Wrapped.bind w (fun a -> Wrapped.unit (a, s));;
+ fun s -> M.bind w (fun a -> M.unit (a, s));;
That won't compile in OCaml because we use the `M`s in a way that's intuitive but unrecognized by OCaml. What OCaml will recognize is more complex. Don't worry; you won't need to code a general implementation of StateT.