Skip to content

where

Module Export

[value] |> [value]

Filters the input iterator using a predicate

Examples

Filtering by logical predicate

import 'iterators'
from [1, 2, 3] where (x) => x > 1

Result:

[2,3]

Filtering by pattern

import 'iterators'
from ['text', 2, true] where is number|boolean

Result:

[2,true]