import {error} from "../util/error.js"; export function first(value: Iterable, predicate?: (it: T) => boolean): T { for (const it of value) { if (!predicate || predicate(it)) return it; } error(); }