/** * Feeds elements of type `A` to `f` until it succeeds. Returns first success * or the accumulation of all errors. * * @tsplus static effect/core/stm/STM.Ops validateFirst */ export function validateFirst( as: Collection, f: (a: A) => STM ): STM, B> { return STM.forEach(as, (a) => f(a).flip).flip }