Sequencing Parser

sequenceParser

Write a function that accepts a list of parsers and produces a parser of lists by calling bindParser and mapParser as you go along the list.

sequenceParser :: [Parser a] -> Parser [a]
sequenceParser [] = value []
sequenceParser (h:t) = bindParser h (\a -> mapParser (sequenceParser t) (\as -> a : as))