Actually it would be better if this returned an Iterator, so that it doesn't materialize the whole sequence. You can do `(0 until numSlices).iterator.map(...)`.