Skip to main content
Module

x/froebel/partial.ts>default

A strictly typed utility library.
Latest
variable default
import { default } from "https://deno.land/x/froebel@v0.23.2/partial.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