effect-io-ai

Package: effect
Module: TArray

TArray.findFirstSTM

Find the first element in the array matching a transactional predicate.

Signature

declare const findFirstSTM: { <A, R, E>(predicate: (value: A) => STM.STM<boolean, E, R>): (self: TArray<A>) => STM.STM<Option.Option<A>, E, R>; <A, R, E>(self: TArray<A>, predicate: (value: A) => STM.STM<boolean, E, R>): STM.STM<Option.Option<A>, E, R>; }

Source

Since v2.0.0