• Flattens the list of list.

    Type Parameters

    • T

    Parameters

    • listList: List<List<T>>

      The list of list.

    Returns List<T>

    The flattened list.

    Examples

    import { concat, empty, fromArray, singleton, toArray } from "./list.ts";
    import { assertEquals } from "../deps.ts";

    const aList = singleton(42);
    const bList = empty<number>();
    const cList = fromArray([5, 4, 1, 2]);
    const listList = fromArray([aList, bList, cList]);
    assertEquals(toArray(concat(listList)), [42, 5, 4, 1, 2]);

Generated using TypeDoc