Skip to main content
Deno 2 is finally here 🎉️
Learn more
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.18.0/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