Use dropWhileEnd; (create and) use takeWhileEnd