 
         // "INPUT" lvalueList
         // "IN" lvalueList
-        if let ((INPUT, lvalues), nextPos) =
+        if let (INPUT, lvalues, nextPos) =
             parse(pos, oneOfLit(T_INPUT, T_IN), lvalueList)
         {
             return (.Input(lvalues), nextPos)
         }
 
         // "DIM @(" expr ")"
-        if let ((DIM, AT, LPAREN, expr, RPAREN), nextPos) =
+        if let (DIM, AT, LPAREN, expr, RPAREN, nextPos) =
             parse(pos, lit(T_DIM), lit(T_At), lit(T_LParen), expression, lit(T_RParen))
         {
             return (.DimArray(expr), nextPos)

func parse<A, B> (
    position: InputPosition,
    a: (InputPosition) -> (A, InputPosition)?,
    b: (InputPosition) -> (B, InputPosition)?) -> ((A, B), InputPosition)?
{
    if let (a, afterA) = a(position) {
        if let (b, afterB) = b(afterA) {
            return ((a, b), afterB)
        }
    }
    return nil

        }

        // "RND(" expression ")"
        if let (RND, LPAREN, expr, RPAREN, nextPos) =
            parse(pos, lit(T_RND), lit(T_LParen), expression, lit(T_RParen))
        {
            return (.Rnd(Box(expr)), nextPos)
        }

        // "(" expression ")"
        if let (LPAREN, expr, RPAREN, nextPos) =
            parse(pos, lit(T_LParen), expression, lit(T_RParen))
        {
            return (.ParenExpr(Box(expr)), nextPos)
        }

        // "@(" expression ")"
        if let (AT, LPAREN, expr, RPAREN, nextPos) =
            parse(pos, lit(T_At), lit(T_LParen), expression, lit(T_RParen))
        {
            return (.ArrayElement(Box(expr)), nextPos)
