**Packages**- base
- bytestring
- text
- containers
- HTTP

span, applied to a predicate p and a list xs, returns a tuple of xs of elements that satisfy p and second element is the remainder of the list:
> span (< 3) [1,2,3,4,1,2,3,4] == ([1,2],[3,4,1,2,3,4])
> span (< 9) [1,2,3] == ([1,2,3],[])
> span (< 0) [1,2,3] == ([],[1,2,3])
span p xs is equivalent to (takeWhile p xs, dropWhile p xs)

span p xs breaks the ByteString into two segments. It is equivalent to (takeWhile p xs, dropWhile p xs)

span p xs breaks the ByteString into two segments. It is equivalent to (takeWhile p xs, dropWhile p xs)

spanEnd behaves like span but from the end of the ByteString. We have
> spanEnd (not.isSpace) "x y z" == ("x y ","z")
and
> spanEnd (not . isSpace) ps
> ==
> let (x,y) = span (not.isSpace) (reverse ps) in (reverse y, reverse x)

spanEnd behaves like span but from the end of the ByteString. We have
> spanEnd (not.isSpace) "x y z" == ("x y ","z")
and
> spanEnd (not . isSpace) ps
> ==
> let (x,y) = span (not.isSpace) (reverse ps) in (reverse y, reverse x)