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

x/froebel/partial.ts>default

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