import { Either } from './either'; /** * Created by beenotung on 2/16/17. */ export interface Maybe { isJust: boolean; isNothing: boolean; map: (f: (a: A) => B) => Maybe; get(): A; withDefault(a: A): Maybe; then(f: (a: A) => void): Maybe; otherwise(f: () => void): Maybe; toEither(e: E): Either; } export declare const Nothing: Maybe; export declare namespace Maybe { function fromNullable(a: A): Maybe; function or(a: Maybe, b: Maybe): Maybe; function and(a: Maybe, b: Maybe): Maybe<[A, B]>; }