Module type CCCat.FREE_MONAD

module type FREE_MONAD = sig .. end
The free monad is built by nesting applications of a functor F.

For instance, Lisp-like nested lists can be built and dealt with like this:

  module Lisp = CCCat.FreeMonad(CCList);;

  let l = Lisp.(inj [1;2;3]  >>= fun x -> inj [x; x*2; x+100]);;


module F: CCCat.FUNCTOR 
type 'a t = 
| Return of 'a
| Roll of 'a t F.t
include CCCat.MONAD
val inj : 'a F.t -> 'a t