travesty

Traversable containers, monad extensions, and more
IN THIS PACKAGE
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.

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.

To begin with, f is applied to mu and init.