# flatMap

FlatMap the success value of a RefResult.

## Signatures

```ts
export declare const flatMap: {
    <A, B, ResultE2>(f: (a: A) => Result.Result<B, ResultE2>): <ResultE, Err, R>(ref: RefResult<A, ResultE, Err, R>) => RefSubject.Computed<Result.Result<B, ResultE | ResultE2>, Err, R>;
    <A, ResultE, Err, R, B, ResultE2>(ref: RefResult<A, ResultE, Err, R>, f: (a: A) => Result.Result<B, ResultE2>): RefSubject.Computed<Result.Result<B, ResultE | ResultE2>, Err, R>;
};
```

## Why

Projects only successful values with `Result.flatMap` while preserving failures; current reads
and future pushes use the same read-only derivation.

## Ownership and lifetime

The flat map view retains no independent state. An Effect read samples the source once; Fx
observation follows later pushes and its observing Scope owns subscription cleanup.
