Now you do not accumulate the elements to drop them but you perform this test even when you know it will be false (after dropping the elements).  I wonder whether it is not better to write a function to abstract the common "skeleton" to both functions, passing functions as arguments to take care about their differences.