• Evaluate the Maybe in an array or a tuple literal and collect the Just values in an equivalent structure.

    Type Parameters

    • TMaybes extends [] | readonly Maybe<any>[]

    Parameters

    • maybes: TMaybes

    Returns Maybe<{
        -readonly [K in keyof TMaybes]: JustT<TMaybes[K]>
    }>

    Remarks

    This function turns an array or a tuple literal of Maybe "inside out". For example:

    • Maybe<T>[] becomes Maybe<T[]>
    • [Maybe<T1>, Maybe<T2>] becomes Maybe<[T1, T2]>
  • Evaluate the Maybe in an iterable and collect the Just values in an array.

    Type Parameters

    • T

    Parameters

    • maybes: Iterable<Maybe<T>>

    Returns Maybe<T[]>

    Remarks

    This function turns an iterable of Maybe "inside out". For example, Iterable<Maybe<T>> becomes Maybe<T[]>.

Generated using TypeDoc