# fromFailures

Creates an Fx from a collection of failures (errors).

## Signatures

```ts
export declare const fromFailures: <E>(failures: Iterable<E>) => import("../Fx.js").Fx<never, E, never>;
```

## Why

Validation and batch operations can preserve every independent typed failure in a
single Effect `Cause` rather than choosing one error or emitting partial values.
Equal reasons are de-duplicated by `Cause.combine`.

## Ownership and lifetime

The iterable is consumed eagerly when `fromFailures` is called. Running the result
forwards the combined cause once, emits no values, and acquires no resources. An
empty iterable produces the empty Cause.

## Examples

```ts
import { Effect } from "effect"
import { fromFailures, observe } from "@typed/fx/Fx"

const failures = fromFailures(["name", "email"])
const program = observe(failures, () => Effect.void).pipe(
  Effect.catch((error) => Effect.succeed(error))
)
```
