# RefOption.flatMap

FlatMap the value inside the Option of a RefOption.

## Signatures

```ts
export declare const flatMap: {
    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(ref: RefOption<A, E, R>) => RefSubject.Computed<Option.Option<B>, E, R>;
    <A, E, R, B>(ref: RefOption<A, E, R>, f: (a: A) => Option.Option<B>): RefSubject.Computed<Option.Option<B>, E, R>;
};
```

## Why

Projects the optional value with `Option.flatMap` for both a current read and later source
pushes; it never changes the RefOption itself.

## 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.
