Skip to main content
Module

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

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

Returns the set union between 2 iterables. This like doing an OR over the 2 iterables.

Type Parameters

optional
TKey = TElement

Parameters

second: Iterable<TElement>

The iterable to get the union 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 (===) against the others. If not given, then the element will used directly.

Returns

Lazy<TElement>