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

Function zipWithPreviousAndNext

packages/effect/src/internal/stream.ts:8663–8669  ·  view source on GitHub ↗
(
  self: Stream.Stream<A, E, R>
)

Source from the content-addressed store, hash-verified

8661
8662/** @internal */
8663export const zipWithPreviousAndNext = <A, E, R>(
8664 self: Stream.Stream<A, E, R>
8665): Stream.Stream<[Option.Option<A>, A, Option.Option<A>], E, R> =>
8666 pipe(
8667 zipWithNext(zipWithPrevious(self)),
8668 map(([[prev, curr], next]) => [prev, curr, pipe(next, Option.map((tuple) => tuple[1]))])
8669 )
8670
8671/** @internal */
8672const zipChunks = <A, B, C>(

Callers

nothing calls this directly

Calls 5

zipWithNextFunction · 0.85
zipWithPreviousFunction · 0.85
pipeFunction · 0.70
mapMethod · 0.65
mapFunction · 0.50

Tested by

no test coverage detected