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 static effect/core/io/Layer.Aspects foldCauseLayer * @tsplus pipeable effect/core/io/Layer foldCauseLayer */ export function foldCauseLayer( failure: (cause: Cause) => Layer, success: (env: Env) => Layer ) { return (self: Layer): Layer => new ILayerFold(self, failure, success) }