Skip to main content
Module

x/lazy/lib/lazy.ts>Lazy#except

A linq-like lazy-evaluation enumerable/iteration library that aims to support deno, node & browser
Latest
method Lazy.prototype.except
import { Lazy } from "https://deno.land/x/lazy@v1.7.3/lib/lazy.ts";

Returns the set difference between 2 iterables. This like doing an XOR over the 2 iterables.

Type Parameters

optional
TKey = TElement

Parameters

second: Iterable<TElement>

The iterable to get the difference of.

optional
compareOn: MapFn<TElement, TKey>

A mapping function to get the key to compare with. The value will be effectively compared using a strict equals (===) againt the others. If not given, then each element will used directly.

Returns

Lazy<TElement>