State_transform_types.Fix
Fix contains the signature for fixpoint builders.
Fix
type ('a, 's) t
val fix : f:(('a -> ('a, 's) t) -> 'a -> ('a, 's) t) -> 'a -> ('a, 's) t
fix ~f init builds a fixed point on f.
fix ~f init
f
At each step, f is passed a continuation mu and a value a. It may choose to return a recursive application of mu, or some value derived from a.
mu
a
To begin with, f is applied to mu and init.
init