0.1.6Updated a month ago
type fn<T> = (...args: T[]) => T;

export const flow = <T = any>(...fns: fn<T>[]) => (x0: T) => fns.reduce(
  (x, f) => f(x),
  x0
);