Skip to content

findFirst

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

Defined in: Data/Arr.ts:79

Returns the first element matching the predicate, or None.

A

(a) => boolean

(data) => Maybe<A>

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