Skip to main content
Module

x/rambda/immutable.d.ts>on

Faster and smaller alternative to Ramda
Latest
function on
import { on } from "https://deno.land/x/rambda@v9.2.0/immutable.d.ts";

It passes the two inputs through unaryFn and then the results are passed as inputs the the binaryFn to receive the final result(binaryFn(unaryFn(FIRST_INPUT), unaryFn(SECOND_INPUT))).

This method is also known as P combinator.

Parameters

binaryFn: (a: U, b: U) => R
unaryFn: (value: T) => U
a: T
b: T

Parameters

binaryFn: (a: U, b: U) => R
unaryFn: (value: T) => U
a: T

Returns

(b: T) => R

Parameters

binaryFn: (a: U, b: U) => R
unaryFn: (value: T) => U

Returns

{ (a: T, b: T): R; (a: T): (b: T) => R; }