mona-dish
    Preparing search index...

    Interface IMonad<T, M>

    IMonad definition, basically a functor with a flatMap implementation, flatMap reduces all nested monads after a function call f into a monad with the nesting level of 1

    flatmap flats nested Monads into a IMonad of the deepest nested implementation

    interface IMonad<T, M extends IMonad<any, any>> {
        flatMap<R>(f?: (data: T) => R): IMonad<any, any>;
        map<R>(fn: (data: T) => R): IFunctor<R>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Methods

    Methods

    • Type Parameters

      • R

      Parameters

      • Optionalf: (data: T) => R

      Returns IMonad<any, any>