effect-io-ai

Package: effect
Module: Sink

Sink.head

Creates a sink containing the first value.

Details

Returns Option.some(first) for non-empty input, or Option.none when the upstream ends without input. The first element is consumed; later elements from the same pulled array are emitted as leftovers.

Signature

declare const head: <In>() => Sink<Option.Option<In>, In, In>

Source

Since v2.0.0