break package:mono-traversable

break applies a predicate to a sequence, and returns a tuple where the first element is the longest prefix (possibly empty) of elements that do not satisfy the predicate. The second element of the tuple is the remainder of the sequence. break p is equivalent to span (not . p)
> break (> 3) (fromList [1,2,3,4,1,2,3,4] :: Vector Int)
(fromList [1,2,3],fromList [4,1,2,3,4])

> break (< z) (fromList "abc" :: Text)
("","abc")

> break (> z) (fromList "abc" :: Text)
("abc","")
Split a textual sequence into two parts, split at the newline.
> breakLine "abc\ndef"
("abc","def")
Split a textual sequence into two parts, split at the first space.
> breakWord "hello world"
("hello","world")