pragmatic-fp-ts
Version:
Opinionated functional programming library with easy use in mind
5 lines (4 loc) • 350 B
TypeScript
import { Endomorphism, Predicate } from "./main";
export declare function when<A>(condition: Predicate<A>, ifPath: Endomorphism<A>, value: A): A;
export declare function when<A>(condition: Predicate<A>, ifPath: Endomorphism<A>): (value: A) => A;
export declare function when<A>(condition: Predicate<A>): (ifPath: Endomorphism<A>) => (value: A) => A;