[Haskell-beginners] dropWhile returning last dropped element

martin martin.drautzburg at web.de
Fri Apr 17 20:08:08 UTC 2015


Hello all

Just curious: is there a library function like dropWhile, but which returns last dropped element along with the
remainder of the list?

If not, how can I write one

- without explicit recursion
- without traversing the list more than once
- without traversing more of the list than necessary


More information about the Beginners mailing list