effect-tree
    Preparing search index...

    Variable zipArraysConst

    zipArrays: {
        <A, B>(
            left: readonly A[],
            right: readonly B[],
        ): readonly These.These<A, B>[];
        <B>(
            right: readonly B[],
        ): <A>(left: readonly A[]) => readonly These.These<A, B>[];
    } = ...

    Zip a pair of arrays. In case of arrays that are not of equal size, we do not crop as the default Array.zip does. Instead we wrap the results in a These, which gives us an operation that is pleasantly associative, as well as reversible with no loss of information.

    If the left array is longer, the result will end in one or more Left<A,B>.

    If the right array is longer, the result will end in one or more Right<A,B>.

    If they are both of equal size, all elements will be of type Both<A,B>.

    Type Declaration

      • <A, B>(left: readonly A[], right: readonly B[]): readonly These.These<A, B>[]
      • Type Parameters

        • A
        • B

        Parameters

        • left: readonly A[]
        • right: readonly B[]

        Returns readonly These.These<A, B>[]

      • <B>(
            right: readonly B[],
        ): <A>(left: readonly A[]) => readonly These.These<A, B>[]
      • Type Parameters

        • B

        Parameters

        • right: readonly B[]

        Returns <A>(left: readonly A[]) => readonly These.These<A, B>[]