import { ILayerFold } from "@effect/core/io/Layer/definition";
/**
 * Feeds the error or output services of this layer into the input of either
 * the specified `failure` or `success` layers, resulting in a new layer with
 * the inputs of this layer, and the error or outputs of the specified layer.
 *
 * @tsplus fluent ets/Layer foldCauseLayer
 */

export function foldCauseLayer_(self, failure, success) {
  return new ILayerFold(self, failure, success);
}
/**
 * Feeds the error or output services of this layer into the input of either
 * the specified `failure` or `success` layers, resulting in a new layer with
 * the inputs of this layer, and the error or outputs of the specified layer.
 *
 * @tsplus static ets/Layer/Aspects foldCauseLayer
 */

export const foldCauseLayer = (failure, success) => self => foldCauseLayer_(self, failure, success);
//# sourceMappingURL=foldCauseLayer.mjs.map