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

x/rambda/mod.ts>partial

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

It is very similar to R.curry, but you can pass initial arguments when you create the curried function.

R.partial will keep returning a function until all the arguments that the function fn expects are passed. The name comes from the fact that you partially inject the inputs.

Parameters

fn: (x0: V0, x1: V1) => T
args: [V0]

Returns

(x1: V1) => T

Parameters

fn: (
x0: V0,
x1: V1,
x2: V2,
) => T
args: [V0, V1]

Returns

(x2: V2) => T

Parameters

fn: (
x0: V0,
x1: V1,
x2: V2,
) => T
args: [V0]

Returns

(x1: V1, x2: V2) => T

Parameters

fn: (
x0: V0,
x1: V1,
x2: V2,
x3: V3,
) => T
args: [V0, V1, V2]

Returns

(x2: V3) => T

Parameters

fn: (
x0: V0,
x1: V1,
x2: V2,
x3: V3,
) => T
args: [V0, V1]

Returns

(x2: V2, x3: V3) => T

Parameters

fn: (
x0: V0,
x1: V1,
x2: V2,
x3: V3,
) => T
args: [V0]

Returns

(
x1: V1,
x2: V2,
x3: V3,
) => T

Parameters

fn: (...a: any[]) => T
args: any[]

Returns

(...a: any[]) => T