{
  "id": "@typed/fx#Fx.filterMapLoopCauseEffect",
  "canonicalId": "@typed/fx/Fx#filterMapLoopCauseEffect",
  "symbol": {
    "id": "@typed/fx#Fx.filterMapLoopCauseEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.filterMapLoopCauseEffect",
    "kind": "constant",
    "signatures": [
      "export declare const filterMapLoopCauseEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, C | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], C, R2>): Fx<A, C, R | R2>;\n};"
    ],
    "summary": "Effectfully loops over the failure causes of an Fx with an accumulator.",
    "sections": {
      "Why": "`filterMapLoopCauseEffect` supports Effectful, stateful cause policy. Each Cause produces `Some`\nto forward or `None` to suppress, but concurrent failure deliveries are not serialized and can\nread the same seed or commit next states out of order.",
      "Ownership and lifetime": "Cause state and callback Effects belong to the consuming run. Services remain required, callback\nfailure is sent to the Sink, and interruption follows each delivery; no semaphore is introduced."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport { Fx } from \"@typed/fx\"\n\nconst handled = Fx.fail(\"offline\").pipe(\n  Fx.filterMapLoopCauseEffect(0, (count, cause) => Effect.succeed([Option.some(cause), count + 1])),\n)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
      "line": 38
    },
    "since": "1.0.0",
    "category": "Stateful transforms"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.filterMapLoopCauseEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.filterMapLoopCauseEffect",
    "declarationKey": "declaration:4c2f63683972291555a8dac0",
    "family": "variable",
    "signatures": [
      "export declare const filterMapLoopCauseEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, C | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], C, R2>): Fx<A, C, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
        "start": {
          "line": 38,
          "column": 14
        },
        "end": {
          "line": 66,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
        "start": {
          "line": 39,
          "column": 3
        },
        "end": {
          "line": 45,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
        "start": {
          "line": 47,
          "column": 3
        },
        "end": {
          "line": 54,
          "column": 23
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#filterMapLoopCauseEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:4c2f63683972291555a8dac0"
  },
  "declaration": {
    "declarationKey": "declaration:4c2f63683972291555a8dac0",
    "name": "filterMapLoopCauseEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const filterMapLoopCauseEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, C | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], C, R2>): Fx<A, C, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
            "start": {
              "line": 38,
              "column": 14
            },
            "end": {
              "line": 66,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B, A, E2, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [\n    Option.Option<Cause.Cause<C>>,\n    B\n], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, C | E2, R | R2>;",
          "<A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n    Option.Option<Cause.Cause<C>>,\n    B\n], C, R2>): Fx<A, C, R | R2>;"
        ],
        "typeParameters": [
          "B",
          "A",
          "E2",
          "R2",
          "C",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
            "start": {
              "line": 39,
              "column": 3
            },
            "end": {
              "line": 45,
              "column": 62
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
            "start": {
              "line": 47,
              "column": 3
            },
            "end": {
              "line": 54,
              "column": 23
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const filterMapLoopCauseEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, C | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n        Option.Option<Cause.Cause<C>>,\n        B\n    ], C, R2>): Fx<A, C, R | R2>;\n};"
    ],
    "typeParameters": [
      "B",
      "A",
      "E2",
      "R2",
      "C",
      "E",
      "R"
    ],
    "summary": "Effectfully loops over the failure causes of an Fx with an accumulator.",
    "sections": {
      "Why": "`filterMapLoopCauseEffect` supports Effectful, stateful cause policy. Each Cause produces `Some`\nto forward or `None` to suppress, but concurrent failure deliveries are not serialized and can\nread the same seed or commit next states out of order.",
      "Ownership and lifetime": "Cause state and callback Effects belong to the consuming run. Services remain required, callback\nfailure is sent to the Sink, and interruption follows each delivery; no semaphore is introduced."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport { Fx } from \"@typed/fx\"\n\nconst handled = Fx.fail(\"offline\").pipe(\n  Fx.filterMapLoopCauseEffect(0, (count, cause) => Effect.succeed([Option.some(cause), count + 1])),\n)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
        "start": {
          "line": 38,
          "column": 14
        },
        "end": {
          "line": 66,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
        "start": {
          "line": 39,
          "column": 3
        },
        "end": {
          "line": 45,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopCauseEffect.ts",
        "start": {
          "line": 47,
          "column": 3
        },
        "end": {
          "line": 54,
          "column": 23
        }
      }
    ],
    "since": "1.0.0",
    "category": "Stateful transforms"
  }
}
