Loading search index…
No recent searches
No results for "Query here"
Standard function composition. Composes two unary functions, applying the second function first.
export const Bluebird = (x: Fn) => (y: Fn) => (z: Fn) => x(y(z)); export const B = Bluebird; export const Compose = B;
const addOne = (x: number) => x + 1; const double = (x: number) => x * 2; const addOneThenDouble = Bluebird(double)(addOne); addOneThenDouble(5); // 12