import { icompact } from "https://deno.land/x/itertools@v1.1.2/mod.ts";
Returns an iterable, filtering out any undefined
values from the input
iterable. This function is useful to convert a list of Maybe<T>
's to
a list of T
's, discarding all the undefined values:
>>> compact([1, 2, undefined, 3])
[1, 2, 3]
Parameters
iterable: Iterable<Maybe<T>>