If I have a bunch of operations on a Sequence<L...
# announcements
j
If I have a bunch of operations on a Sequence<Long>, is each step unboxing and boxing the value? Or is a primitive long being passed through each step? For example
Copy code
sequenceOf(1L, 2L, 3L).map { it + 1L }.forEach { println(it) }
k
Yes, at every step everything is boxed and unboxed. That's always the case when using primitives in generics.