/** * Zips each element with both the previous and next element. * * @tsplus getter effect/core/stream/Stream zipWithPreviousAndNext */ export function zipWithPreviousAndNext( self: Stream ): Stream, A, Maybe]> { return self .zipWithPrevious .zipWithNext .map(([[prev, curr], next]) => [prev, curr, next.map((tuple) => tuple[1])] as const) }