public <B> Cont<R,B> withCont(Function<Function<B,R>,Function<A,R>> transform) { return new Cont<>(Functions.compose(fn,transform)); }
public Cont<R,A> mapCont(Function<R,R> transform) { return new Cont<>(Functions.compose(transform,fn)); }
// (>>) (Control.Monad) public default <A, B> _<µ, B> semicolon(_<µ, A> nestedA, _<µ, B> nestedB) { return bind(nestedA, Functions.<A, _<µ, B>>constant(nestedB)); }
public default <A, B> B foldr(final Function<A, Function<B, B>> fn, B b, _<F, A> as) { //foldr f z t = appEndo (foldMap (Endo . f) t) z return foldMap(Functions.<B>endoMonoid(), fn, as).apply(b); }
// join (Control.Monad) public default <A> _<µ, A> join(_<µ, _<µ, A>> nestedNestedA) { return bind(nestedNestedA, Functions.<_<µ, A>>id()); }