• Appends the element to tail of the list.

    Type Parameters

    • T

    Parameters

    • value: T

      The value to be appended.

    Returns ((list) => List<T>)

    The appended list.

    Examples

    import { appendToTail, singleton, toIterator } from "./list.ts";
    import { assertEquals } from "../deps.ts";

    const iter = toIterator(appendToTail(1)(singleton(4)));
    assertEquals(iter.next(), { value: 4, done: false });
    assertEquals(iter.next(), { value: 1, done: false });
    assertEquals(iter.next(), { value: undefined, done: true });

Generated using TypeDoc