MCPcopy Create free account
hub / github.com/Effect-TS/effect / zipWithPreviousAndNext

Function zipWithPreviousAndNext

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

Source from the content-addressed store, hash-verified

8699
8700/** @internal */
8701export const zipWithPreviousAndNext = <A, E, R>(
8702 self: Stream.Stream<A, E, R>
8703): Stream.Stream<[Option.Option<A>, A, Option.Option<A>], E, R> =>
8704 pipe(
8705 zipWithNext(zipWithPrevious(self)),
8706 map(([[prev, curr], next]) => [prev, curr, pipe(next, Option.map((tuple) => tuple[1]))])
8707 )
8708
8709/** @internal */
8710const 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