Shawn
12/17/2018, 2:46 PMzipWithNext
will group items together into pairs if that works for youDias
12/17/2018, 2:49 PMDias
12/17/2018, 3:39 PMShawn
12/17/2018, 3:51 PMT
to T?
, but couldn’t you more or less do that by bolting on a sequenceOf(null)
to both ends of your sequence?Dias
12/17/2018, 3:58 PMDias
12/17/2018, 3:59 PMDias
12/17/2018, 4:00 PMShawn
12/17/2018, 4:01 PMDominaezzz
12/17/2018, 4:03 PMchunked
?Pavlo Liapota
12/17/2018, 4:06 PMwindowed
Dias
12/17/2018, 4:27 PMDias
12/17/2018, 7:21 PMPavlo Liapota
12/17/2018, 7:30 PMwindowed(2, partialWindows = true)
will return [[1, 2], [2, 3], [3]]
you can use getOrNull(1)
to get second item or null
but yeah, this doesn’t look good