Optimize performance of drop_last_while
Code style