anchor.diff:    else
       t.ToString()
   
  +
  +(* C code generation for an expression *)
   let rec ccodegen (e:Expr): string =
           match e with
           | Patterns.Lambda (x, body) -> sprintf "ERROR LAMBDA NOT SUPPORTED!"
  
positive.code:     | "op_Subtraction" -> Some("-")
      | _ -> None
  
  let rec prettyprint (e:Expr): string =
          match e with
          | Patterns.Lambda (x, body) -> sprintf "\%s. %s" (x.Name) (prettyprint body)
  
negative.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.NewArray(tp, elems) -> 
            sprintf "ERROR new array without let binding [%A]" e
          | Patterns.Value(v, tp) -> sprintf "%s" (v.ToString())
          | _ -> sprintf "ERROR[%A]" e
  
  (* C code generation for a statement in the form of `let var = e` *)
  let ccodegenStatement (var: Var, e: Expr): string = 
    match e with 
    | Patterns.NewArray(tp, elems) -> 
      sprintf "%s %s = malloc(sizeof(%s) * %d);\n\t%s" (ccodegenType var.Type) (var.Name) (ccodegenType tp) (List.length elems) 
        (String.concat "\n\t" (List.mapi (fun index elem -> sprintf "%s[%d] = %s;" var.Name index (prettyprint elem)) elems))
    | _ -> 
      sprintf "%s %s = %s;" (ccodegenType var.Type) (var.Name) (ccodegen e)
  
  (* C code generation for a function *)
  let ccodegenFunction (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 ccodegenStatement 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. *)
  