takeWhile package:bytestring

Similar to takeWhile, returns the longest (possibly empty) prefix of elements satisfying the predicate.
takeWhile, applied to a predicate p and a ByteString xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p.
Similar to takeWhile, returns the longest (possibly empty) prefix of elements satisfying the predicate.
Returns the longest (possibly empty) suffix of elements satisfying the predicate. takeWhileEnd p is equivalent to reverse . takeWhile p . reverse.
takeWhileEnd, applied to a predicate p and a ByteString xs, returns the longest suffix (possibly empty) of xs of elements that satisfy p.
Returns the longest (possibly empty) suffix of elements satisfying the predicate. takeWhileEnd p is equivalent to reverse . takeWhile p . reverse.
>>> {-# LANGUAGE OverloadedLists #-)

>>> takeWhileEnd even [1,2,3,4,6]
[4,6]
Returns the longest (possibly empty) suffix of elements satisfying the predicate. takeWhileEnd p is equivalent to reverse . takeWhile p . reverse.
Returns the longest (possibly empty) suffix of elements satisfying the predicate. takeWhileEnd p is equivalent to reverse . takeWhile p . reverse.