JavaScript monadic parser combinators