Extract the loop from dropEnd
Implement strict takeEnd