anchor.diff:      | "op_Subtraction" -> Some("-")
       | _ -> None
   
  +(* Pretty prints the given expression *)
   let rec prettyprint (e:Expr): string =
           match e with
           | Patterns.Lambda (x, body) -> sprintf "\%s. %s" (x.Name) (prettyprint body)
  
positive.code:              | "GetArray" -> sprintf "%s[%s]" (prettyprint elist.[0]) (prettyprint elist.[1])
               | _ -> sprintf "ERROR CALL %s(%s)" op.Name (String.concat ", " (List.map prettyprint elist))
          | Patterns.Var(x) -> sprintf "%s" x.Name
          (*
          | Patterns.Let(x, Patterns.NewArray(tp, elems), e2) -> 
            sprintf "{%s};" (String.concat ", " (List.map prettyprint elems))
          | Patterns.NewArray(tp, elems) -> 
            sprintf "ERROR new array without let binding [%A]" e
          *)
          | Patterns.NewArray(tp, elems) -> 
            sprintf "(%s[%d]) {%s}" (ccodegenType tp) (List.length elems) (String.concat ", " (List.map prettyprint elems))
          | Patterns.Value(v, tp) -> sprintf "%s" (v.ToString())
          | _ -> sprintf "ERROR[%A]" e
  
  
  let ccodegenTop (e: Expr) (name: string): string =
    let rec extractHeader exp curInputs statements = match exp with 
      | Patterns.Lambda (x, body) -> extractHeader body (List.append curInputs [x]) statements
      | Patterns.Let(x, e1, e2) -> extractHeader e2 curInputs (List.append statements [(x, e1)])
      | _ -> (exp, curInputs, statements)
    let (result, inputs, statements) = extractHeader e [] []
    let statementsCode = (String.concat "\n\t" (List.map (fun (lhs: Var, rhs: Expr) -> sprintf "%s %s = %s;" (ccodegenType lhs.Type) (lhs.Name) (ccodegen rhs)) statements))
    sprintf "%s %s(%s) {\n\t%s\n\treturn %s;\n}" (ccodegenType(result.Type)) name (String.concat ", " (List.map (fun (x: Var) -> ccodegenType(x.Type) + " " + x.Name) inputs)) statementsCode (ccodegen result)
  
  (* Performs a simple kind of ANF conversion for specific statements. *)
  
negative.code: 
  let mutable variable_counter = 0
  
  (* Generates a unique variable name *)
  let newVar (name: string): string = 
    variable_counter <- variable_counter + 1
    sprintf "%s%d" name variable_counter
  
  (* C code generation for a type *)
  let rec ccodegenType (t: System.Type): string = 
    if(t.IsArray) then
     "array_" + (ccodegenType (t.GetElementType()))
  