# prepend

Prepends a value to the beginning of an Fx.

## Signatures

```ts
export declare const prepend: {
    <B>(value: B): <A, E, R>(fx: Fx<A, E, R>) => Fx<B | A, E, R>;
    <A, E, R, B>(fx: Fx<A, E, R>, value: B): Fx<B | A, E, R>;
};
```

## Why

`prepend` emits an initial marker through the same Sink before the source is
observed, without allocating a separate collection or state holder.

## Ownership and lifetime

The value is emitted exactly once before the source run starts, then every
source success or failure is delivered. Interruption or a defect in the Sink's
prepended-value handler prevents the source from starting. The operation
acquires no resource and retains source failure, services, and lifetime.

## Examples

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

const framed = Fx.prepend(Fx.fromIterable([1, 2]), "start")
Effect.runPromise(Fx.collectAll(framed)).then(console.log)
// ["start", 1, 2]
```
