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

x/rambda/mod.ts>on

Faster and smaller alternative to Ramda
Go to Latest
function on
import { on } from "https://deno.land/x/rambda@9.2.1/mod.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; }