Skip to content

findFirst

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

Defined in: Utils/Arr.ts:82

Returns the first element matching the predicate, or None.

A

(a) => boolean

(data): Maybe<A>

readonly A[]

Maybe<A>

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