• Creates the list of elements from Array.

    Type Parameters

    • T

    Parameters

    • arr: readonly T[]

      The source array.

    Returns List<T>

    The list of elements.

    Examples

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

    assertEquals(toArray(fromArray([2.81, 3.14, 1.58])), [2.81, 3.14, 1.58]);
    assertEquals(toArray(fromArray([])), []);

Generated using TypeDoc