Skip to main content
variable compose
import { compose } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Performs right-to-left function composition.

Use Array.prototype.reduce() to perform right-to-left function composition. The last (rightmost) function can accept one or more arguments; the remaining functions must be unary.

type

(...fns: Func[]) => unknown