import * as tsplus_module_1 from "@effect/core/io/Effect/operations/flip";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/excl-forEach";
/**
 * Feeds elements of type `A` to `f` until it succeeds. Returns first success
 * or the accumulation of all errors.
 *
 * @tsplus static ets/Effect/Ops validateFirst
 */

export function validateFirst(as, f, __tsplusTrace) {
  return tsplus_module_1.flip(tsplus_module_2.forEach(as, a => tsplus_module_1.flip(f(a), __tsplusTrace), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=validateFirst.mjs.map