import * as tsplus_module_1 from "@tsplus/stdlib/collections/List/empty";
import * as tsplus_module_2 from "@effect/core/io/Cause/definition";
import * as tsplus_module_3 from "@tsplus/stdlib/collections/List/prepend";
import * as tsplus_module_4 from "@tsplus/stdlib/data/Maybe/definition";
import * as tsplus_module_5 from "@effect/core/io/Cause/operations/foldLeft";
import * as tsplus_module_6 from "@tsplus/stdlib/collections/List/reverse";
/**
 * Produces a list of all recoverable errors `E` in the `Cause`.
 *
 * @tsplus getter ets/Cause failures
 */

export function failures(self) {
  return tsplus_module_6.reverse(tsplus_module_5.foldLeft_(self, tsplus_module_1.empty(), (acc, curr) => tsplus_module_2.isFailType(curr) ? tsplus_module_4.some(tsplus_module_3.prepend_(acc, curr.value)) : tsplus_module_4.some(acc)));
}
//# sourceMappingURL=failures.mjs.map