succeedsAnywhere :: Parser a -> String -> Bool
succeedsAnywhere p s = or $ map (succeedsWithLeftover p) (tails s)
  where
    tails :: [a] -> [[a]]
    tails [] = [[]]
    tails ass@(_:as) = ass : tails as
succeedsAnywhere :: Parser a -> String -> Bool
succeedsAnywhere p s = or $ map (succeedsWithLeftover p) (tails s)
  where
    tails :: [a] -> [[a]]
    tails [] = [[]]
    tails ass@(_:as) = ass : tails as
succeedsAnywhere p s = or $ map (succeedsWithLeftover p) (tails s)
  where
    tails :: [a] -> [[a]]
    tails [] = [[]]
    tails ass@(_:as) = ass : tails as