Hyperlinkv0.8.0-beta.28

Sink

Sink.lastconsteffect/Sink.ts:1442
<In>(): Sink<Option.Option<In>, In>

Creates a sink containing the last value.

When to use

Use when you need to consume all upstream input and keep only the final element.

Details

Returns Option.some(last) with the final input value, or Option.none when the upstream ends without input.

Gotchas

This sink produces a result only when the upstream ends, so it does not complete for a stream that does not end.

constructorshead
Source effect/Sink.ts:14421 lines
export const last = <In>(): Sink<Option.Option<In>, In> => last_ as any