
6 Jan
2008
6 Jan
'08
4:35 p.m.
Hello, I propose that we add the following combinators to the 'Control.Applicative' module: skipMany :: (Alternative f) => f a -> f () skipMany p = skipSome p <|> pure () skipSome :: (Alternative f) => f a -> f () skipSome p = p *> skipMany p endBy :: (Alternative f) => f a -> f b -> f [a] endBy p s = many (p <* s) endBy1 :: (Alternative f) => f a -> f b -> f [a] endBy1 p s = some (p <* s) sepBy :: (Alternative f) => f a -> f v -> f [a] sepBy p s = sepBy1 p s <|> pure [] sepBy1 :: (Alternative f) => f a -> f v -> f [a] sepBy1 p s = (:) <$> p <*> many (s *> p) Any objections? Deadline for discussion is 2 weeks from now, which would be the 20th of Jan. -Iavor