• Removes duplicated elements by comparing the equality.

    Type Parameters

    • T

    Parameters

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

    The filtered list.

    Examples

    import { fromIterable, toArray, unique } from "./list.ts";
    import { assertEquals } from "../deps.ts";
    import { nonNanHash } from "./type-class/hash.ts";

    const uniqueNums = unique(nonNanHash)(fromIterable([1, 4, 2, 3, 5, 2, 3]));
    assertEquals(toArray(uniqueNums), [1, 4, 2, 3, 5]);

Generated using TypeDoc