letRecExpr :: Parser Expression
letRecExpr = do
  keyWord "letrec"
  procBindings <- many procBinding
  keyWord "in"
  recBody <- expression
  return $ LetRecExpr procBindings recBody
  where
    procBinding = try $ do
      procName <- identifier
      params <- parens $ many identifier
      equal
      procBody <- expression
      return (procName, params, procBody)


-- | ManyExprs ::= <empty>
--             ::= Many1Exprs
letRecExpr :: Parser Expression
letRecExpr = do
  keyWord "letrec"
  procBindings <- many procBinding
  keyWord "in"
  recBody <- expression
  return $ LetRecExpr procBindings recBody
  where
    procBinding = try $ do
      procName <- identifier
      params <- parens $ many identifier
      equal
      procBody <- expression
      return (procName, params, procBody)


-- | ManyExprs ::= <empty>
--             ::= Many1Exprs
letRecExpr = do
  keyWord "letrec"
  procBindings <- many procBinding
  keyWord "in"
  recBody <- expression
  return $ LetRecExpr procBindings recBody
  where
    procBinding = try $ do
      procName <- identifier
      params <- parens $ many identifier
      equal
      procBody <- expression
      return (procName, params, procBody)


-- | ManyExprs ::= <empty>
--             ::= Many1Exprs