window2<I> static method

Conveyor<From<I>, Tuple2<Option<I>, I>> window2<I>()

Implementation

static Conveyor<From<I>, Tuple2<Option<I>, I>> window2<I>() {
  Conveyor<From<I>, Tuple2<Option<I>, I>> go(Option<I> prev) =>
      consume<I, Tuple2<Option<I>, I>>((I i) => produce<I, Tuple2<Option<I>, I>>(tuple2(prev, i)).lazyPlus(() => go(some(i))));
  return go(none());
}