import * as tsplus_module_1 from "@tsplus/stdlib/structure/Equals";
import * as tsplus_module_2 from "@tsplus/stdlib/data/Maybe/definition";
import * as tsplus_module_3 from "@effect/core/io/Cause/operations/foldLeft";
/**
 * Determines if this cause contains or is equal to the specified cause.
 *
 * @tsplus fluent ets/Cause contains
 */

export function contains_(self, that) {
  if (self === that) {
    return true;
  }

  return tsplus_module_3.foldLeft_(self, false, (acc, cause) => tsplus_module_2.some(acc || tsplus_module_1.equals(cause, that)));
}
/**
 * Determines if this cause contains or is equal to the specified cause.
 *
 * @tsplus static ets/Cause/Aspects contains
 */

export const contains = that => self => contains_(self, that);
//# sourceMappingURL=contains.mjs.map