# take

Takes the first `n` elements from an Fx and then completes.

## Signatures

```ts
export declare const take: {
    (n: number): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R>;
    <A, E, R>(fx: Fx<A, E, R>, n: number): Fx<A, E, R>;
};
```

## Why

`take` bounds cardinality without buffering: it forwards at most the first `n` values in order and
then completes the run early.

## Ownership and lifetime

A per-run counter owns no external resource. Reaching the limit interrupts/stops upstream work;
source failures before that point and consumer interruption remain observable.

## Examples

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

const firstTwo = Fx.fromIterable([1, 2, 3]).pipe(Fx.take(2))
```
