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

Type Parameters

Hierarchy

Implemented by

Methods

Methods

  • Type Parameters

    • T

    • M

    Parameters

    • f: ((T: any) => M)
        • (T: any): M
        • Parameters

          • T: any

          Returns M

    Returns IMonad<any, any>

  • Type Parameters

    • R

    Parameters

    • fn: ((data: T) => R)
        • (data: T): R
        • Parameters

          • data: T

          Returns R

    Returns IFunctor<R>

Generated using TypeDoc