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