A version of
dropWhileEnd but with different strictness
properties. The function
dropWhileEnd can be used on an
infinite list and tests the property on each character. In contrast,
dropWhileEnd' is strict in the spine of the list but only tests
the trailing suffix. This version usually outperforms
dropWhileEnd if the list is short or the test is expensive.
Note the tests below cover both the prime and non-prime variants.
dropWhileEnd isSpace "ab cde " == "ab cde"
dropWhileEnd' isSpace "ab cde " == "ab cde"
last (dropWhileEnd even [undefined,3]) == undefined
last (dropWhileEnd' even [undefined,3]) == 3
head (dropWhileEnd even (3:undefined)) == 3
head (dropWhileEnd' even (3:undefined)) == undefined