Skip to content

findFirst

findFirst<A>(predicate): (data) => Option<A>

Defined in: Core/Arr.ts:82

Returns the first element matching the predicate, or None.

A

(a) => boolean

(data): Option<A>

readonly A[]

Option<A>

pipe([1, 2, 3, 4], Arr.findFirst(n => n > 2)); // Some(3)