{
  "id": "@typed/fx/Fx#filterMapLoopEffect",
  "canonicalId": "@typed/fx/Fx#filterMapLoopEffect",
  "symbol": {
    "id": "@typed/fx/Fx#filterMapLoopEffect",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "filterMapLoopEffect",
    "kind": "constant",
    "signatures": [
      "export declare const filterMapLoopEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E, R2>): Fx<C, E, R | R2>;\n};"
    ],
    "summary": "Effectfully loops over an Fx with an accumulator, producing an optional new value.",
    "sections": {
      "Why": "`filterMapLoopEffect` makes the state transition Effectful while retaining zero-or-one output per\ninput. It adds no serialization: overlapping producer callbacks can read the same seed, complete\nout of order, and overwrite one another's next state.",
      "Ownership and lifetime": "One mutable seed belongs to each run. Callback Causes are delivered to the Sink, services remain\nrequired, and interruption follows each delivery; callers need a serialized producer for atomic state."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport { Fx } from \"@typed/fx\"\n\nconst counted = Fx.fromIterable([\"a\", \"b\"]).pipe(\n  Fx.filterMapLoopEffect(0, (count, value) => Effect.succeed([Option.some(`${count}:${value}`), count + 1])),\n)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
      "line": 37
    },
    "since": "1.0.0",
    "category": "Stateful transforms"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#filterMapLoopEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "filterMapLoopEffect",
    "qualifiedName": "filterMapLoopEffect",
    "declarationKey": "declaration:0ca2ed8c262db139d5fc0fdb",
    "family": "variable",
    "signatures": [
      "export declare const filterMapLoopEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E, R2>): Fx<C, E, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
        "start": {
          "line": 37,
          "column": 14
        },
        "end": {
          "line": 56,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
        "start": {
          "line": 38,
          "column": 3
        },
        "end": {
          "line": 41,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
        "start": {
          "line": 43,
          "column": 3
        },
        "end": {
          "line": 47,
          "column": 23
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.filterMapLoopEffect"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:0ca2ed8c262db139d5fc0fdb",
    "name": "filterMapLoopEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const filterMapLoopEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E, R2>): Fx<C, E, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
            "start": {
              "line": 37,
              "column": 14
            },
            "end": {
              "line": 56,
              "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: A) => Effect.Effect<readonly [\n    Option.Option<C>,\n    B\n], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;",
          "<A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n    Option.Option<C>,\n    B\n], E, R2>): Fx<C, E, R | R2>;"
        ],
        "typeParameters": [
          "B",
          "A",
          "E2",
          "R2",
          "C",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
            "start": {
              "line": 38,
              "column": 3
            },
            "end": {
              "line": 41,
              "column": 62
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
            "start": {
              "line": 43,
              "column": 3
            },
            "end": {
              "line": 47,
              "column": 23
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const filterMapLoopEffect: {\n    <B, A, E2, R2, C>(seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;\n    <A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: A) => Effect.Effect<readonly [\n        Option.Option<C>,\n        B\n    ], E, R2>): Fx<C, E, R | R2>;\n};"
    ],
    "typeParameters": [
      "B",
      "A",
      "E2",
      "R2",
      "C",
      "E",
      "R"
    ],
    "summary": "Effectfully loops over an Fx with an accumulator, producing an optional new value.",
    "sections": {
      "Why": "`filterMapLoopEffect` makes the state transition Effectful while retaining zero-or-one output per\ninput. It adds no serialization: overlapping producer callbacks can read the same seed, complete\nout of order, and overwrite one another's next state.",
      "Ownership and lifetime": "One mutable seed belongs to each run. Callback Causes are delivered to the Sink, services remain\nrequired, and interruption follows each delivery; callers need a serialized producer for atomic state."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport { Fx } from \"@typed/fx\"\n\nconst counted = Fx.fromIterable([\"a\", \"b\"]).pipe(\n  Fx.filterMapLoopEffect(0, (count, value) => Effect.succeed([Option.some(`${count}:${value}`), count + 1])),\n)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
        "start": {
          "line": 37,
          "column": 14
        },
        "end": {
          "line": 56,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
        "start": {
          "line": 38,
          "column": 3
        },
        "end": {
          "line": 41,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMapLoopEffect.ts",
        "start": {
          "line": 43,
          "column": 3
        },
        "end": {
          "line": 47,
          "column": 23
        }
      }
    ],
    "since": "1.0.0",
    "category": "Stateful transforms"
  }
}
