Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/itertools/mod.ts>icompress

🦕 A TypeScript port of Python's itertools and more-itertools for Deno
Latest
function icompress
import { icompress } from "https://deno.land/x/itertools@v1.1.2/mod.ts";

Returns an iterator that filters elements from data returning only those that have a corresponding element in selectors that evaluates to true. Stops when either the data or selectors iterables has been exhausted.

Parameters

data: Iterable<T>
selectors: Iterable<boolean>

Returns

Iterable<T>