voddan
02/20/2016, 8:12 PMmap
only the elements where a condition is hold
For example to rewrite this code: list.map { if(it % 2 = 1) it * 2 else it}
Ideally that would work as separating a steam into two streams, and then zipping it together preserving the order
(indexing all the elements is ugly and mem consuming)