Using `view` also seems okay here, since `sofar ++ ...` will be creating a fresh array that no one else references.