MCPcopy Index your code
hub / github.com/Effect-TS/effect / head

Function head

packages/effect/src/internal/sink.ts:1493–1502  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1491
1492/** @internal */
1493export const head = <In>(): Sink.Sink<Option.Option<In>, In, In> =>
1494 fold(
1495 Option.none() as Option.Option<In>,
1496 Option.isNone,
1497 (option, input) =>
1498 Option.match(option, {
1499 onNone: () => Option.some(input),
1500 onSome: () => option
1501 })
1502 )
1503
1504/** @internal */
1505export const ignoreLeftover = <A, In, L, E, R>(self: Sink.Sink<A, In, L, E, R>): Sink.Sink<A, In, never, E, R> =>

Callers

nothing calls this directly

Calls 1

foldFunction · 0.85

Tested by

no test coverage detected