Core concept
(1 to 5).sliding(3).toList // List(List(1,2,3), List(2,3,4), List(3,4,5))Advertisement
How it works
Iterator returned. Materialize with .toList.
Advertisement
Trade-offs + gotchas
Time-series windows. Batching.
(1 to 5).sliding(3).toList // List(List(1,2,3), List(2,3,4), List(3,4,5))Iterator returned. Materialize with .toList.
Time-series windows. Batching.