Skip to main content
Module

x/froebel/function.ts>partial

A strictly typed utility library.
Go to Latest
variable partial
import { partial } from "https://deno.land/x/froebel@v0.23.1/function.ts";

Partially apply a function.

Examples

Example 1

const divide = (dividend: number, divisor: number) => dividend / divisor

// (divisor: number) => number
const oneOver = partial(divide, 1)

// prints: 0.25
console.log(oneOver(4))

type

<T extends λ, PL extends PartialList<Parameters<T>>>(fun: T, ...argsLeft: PL) => unknown