frellan
02/17/2019, 9:52 PMFoo
is a Stream<Whatever>
, I want to map and convert it to a Sequence, is there any difference at all between these?
foo
.asSequence()
.map { it.doStuff() }
or
foo
.map { it.doStuff() }
.asSequence()
Ruckus
02/17/2019, 10:17 PMmap
operation on the stream, the second does it on the sequence.Ruckus
02/17/2019, 10:18 PMfrellan
02/17/2019, 10:37 PMDico
02/17/2019, 11:08 PMfrellan
02/17/2019, 11:21 PMSequence
and Stream
should be pretty interchangable on thatDico
02/18/2019, 7:07 AMasSequence()
, that's not even a terminal operation