Composes two functions mathematically. compose(f)(g)(x) means f(g(x)).
compose(f)(g)(x)
f(g(x))
The function to do at last.
The composed function.
expect(compose((x: number) => x + 1)((x: number) => x * 2)(3)).toStrictEqual(7); Copy
expect(compose((x: number) => x + 1)((x: number) => x * 2)(3)).toStrictEqual(7);
Composes two functions mathematically.
compose(f)(g)(x)meansf(g(x)).