-- |Like @break@, but drops the matched item.
breakAround :: Eq a => (a -> Bool) -> [a] -> ([a], [a])
breakAround pred list = (before, after) where
  (before, rest) = break pred list
  after = case rest of
            (x:xs) | pred x -> xs
            _ -> after

-- |firstTrue takes a list of things to do and gives you back the first one
-- that produces a result.  (XXX this is probably the composition of some
-- other monadic operators -- which?)
breakAround :: Eq a => (a -> Bool) -> [a] -> ([a], [a])
breakAround pred list = (before, after) where
  (before, rest) = break pred list
  after = case rest of
            (x:xs) | pred x -> xs
            _ -> after

-- |firstTrue takes a list of things to do and gives you back the first one
-- that produces a result.  (XXX this is probably the composition of some
-- other monadic operators -- which?)
breakAround pred list = (before, after) where
  (before, rest) = break pred list
  after = case rest of
            (x:xs) | pred x -> xs
            _ -> after

-- |firstTrue takes a list of things to do and gives you back the first one
-- that produces a result.  (XXX this is probably the composition of some
-- other monadic operators -- which?)