Returns (<A, B, C>(q) => ((f) => ((g) => Fn<X, C>)))
The lifted hom X => C
.
import { assertEquals } from "../deps.ts";
import { liftBinary } from "./func.ts";
const lifter = liftBinary<void>()((a: number) => (b: number) => a + b);
assertEquals(lifter(() => 1)(() => 2)(), 3);
- <A, B, C>(q): ((f) => ((g) => Fn<X, C>))
Parameters
q: ((a) => ((b) => C))
- (a): ((b) => C)
Returns ((b) => C)
Returns ((f) => ((g) => Fn<X, C>))
- (f): ((g) => Fn<X, C>)
Returns ((g) => Fn<X, C>)
- (g): Fn<X, C>
Returns Fn<X, C>
Lifts the binary operation
q
over the homX => _
.