If you operate on a Sequence rather than a List th...
# getting-started
d
If you operate on a Sequence rather than a List then it won’t make intermediate copies.
list.asSequence()
will return a sequence from a list.