cannot this be just `evaluations[i - 1]` and you don't need to keep `last_index`?