------------------------------------------------------------
-- 1. Parsing repetitions
------------------------------------------------------------
+sequenceA :: Applicative f => [f a] -> f [a]
+sequenceA [] = pure []
+sequenceA (x:xs) = (:) <$> x <*> sequenceA xs
+-- sequenceA (x:xs) = liftA2 (:) x (sequenceA xs)
+
+replicateA :: Applicative f => Int -> f a -> f [a]
+replicateA n x = sequenceA (replicate n x)
zeroOrMore :: Parser a -> Parser [a]
-zeroOrMore p = undefined
+zeroOrMore p = oneOrMore p <|> pure []
oneOrMore :: Parser a -> Parser [a]
-oneOrMore p = undefined
+oneOrMore p = liftA2 (:) p (zeroOrMore p)
------------------------------------------------------------
-- 2. Utilities