(* Unpacks a function wrapped inside a generator, applying it into a new
generator. *)letapplyfm=Gen.bindf(funf'->Gen.bindm(funm'->Gen.init(f'm')))(* Returns a new generator obtained by applying a function to three existing
generators. *)letlift3fm1m2m3=Gen.apply(Gen.apply(Gen.apply(Gen.initf)m1)m2)m3