• Removes the last element from the list.

    Type Parameters

    • T

    Parameters

    • list: List<T>

      The source list.

    Returns List<T>

    The picked list.

    Examples

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

    assertEquals(init(empty()), empty());

    assertEquals(toArray(init(fromArray([5, 2, 1, 3]))), [5, 2, 1]);

Generated using TypeDoc