effect-io-ai

Package: effect
Module: Chunk

Chunk.findFirst

Returns the first element that satisfies the specified predicate, or None if no such element exists.

Signature

declare const findFirst: { <A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Option<B>; <A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Option<A>; <A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Option<B>; <A>(self: Chunk<A>, predicate: Predicate<A>): Option<A>; }

Source

Since v2.0.0