Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/mod.ts>compose

Faster and smaller alternative to Ramda
Go to Latest
function compose
import { compose } from "https://deno.land/x/rambda@9.2.1/mod.ts";

It performs right-to-left function composition.

Type Parameters

TArgs extends any[]
R1
R2
R3
R4
R5
R6
R7
TResult

Parameters

...func:
[
(a: any) => TResult,
Array<(a: any) => any>,
(a: R6) => R7,
(a: R5) => R6,
(a: R4) => R5,
(a: R3) => R4,
(a: R2) => R3,
(a: R1) => R2,
(...args: TArgs) => R1,
]

Returns

(...args: TArgs) => TResult

Type Parameters

TArgs extends any[]
R1
R2
R3
R4
R5
R6
R7
TResult

Parameters

f7: (a: R6) => R7
f6: (a: R5) => R6
f5: (a: R4) => R5
f4: (a: R3) => R4
f3: (a: R2) => R3
f2: (a: R1) => R2
f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R7

Type Parameters

TArgs extends any[]
R1
R2
R3
R4
R5
R6
R7

Parameters

f7: (a: R6) => R7
f6: (a: R5) => R6
f5: (a: R4) => R5
f4: (a: R3) => R4
f3: (a: R2) => R3
f2: (a: R1) => R2
f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R7

Type Parameters

TArgs extends any[]
R1
R2
R3
R4
R5
R6

Parameters

f6: (a: R5) => R6
f5: (a: R4) => R5
f4: (a: R3) => R4
f3: (a: R2) => R3
f2: (a: R1) => R2
f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R6

Type Parameters

TArgs extends any[]
R1
R2
R3
R4
R5

Parameters

f5: (a: R4) => R5
f4: (a: R3) => R4
f3: (a: R2) => R3
f2: (a: R1) => R2
f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R5

Type Parameters

TArgs extends any[]
R1
R2
R3
R4

Parameters

f4: (a: R3) => R4
f3: (a: R2) => R3
f2: (a: R1) => R2
f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R4

Type Parameters

TArgs extends any[]
R1
R2
R3

Parameters

f3: (a: R2) => R3
f2: (a: R1) => R2
f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R3

Type Parameters

TArgs extends any[]
R1
R2

Parameters

f2: (a: R1) => R2
f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R2

Type Parameters

TArgs extends any[]
R1

Parameters

f1: (...args: TArgs) => R1

Returns

(...args: TArgs) => R1