/** * Determines if this cause contains or is equal to the specified cause. * * @tsplus static effect/core/io/Cause.Aspects contains * @tsplus pipeable effect/core/io/Cause contains */ export function contains(that: Cause) { return (self: Cause): boolean => { if ((self as Cause) === that) { return true } return self.foldLeft( false, (acc, cause) => Maybe.some(acc || Equals.equals(cause, that)) ) } }