UNPKG

@markandrus/effect-derive

Version:

Derive Covariant (Functor), Foldable, and Traversable instances, as well as base functors, for algebraic data types (ADTs)

7 lines (6 loc) 133 B
export const ana = (T) => (g) => (b) => { function go(b) { return T.embed(T.F.map(g(b), go)); } return go(b); };