anchor.diff:     "array_" + (ccodegenType (t.GetElementType()))
     else if(t.IsGenericParameter) then
       "number_t"
  -  else
  +  else if (t = typeof<double>) then
  +    "number_t"
  +  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!"
  -        | Patterns.Call (None, op, elist) -> 
  -            match op.Name with
  -             | OperatorName opname -> sprintf "%s %s %s" (prettyprint elist.[0]) opname (prettyprint elist.[1]) 
  -             | "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
  +  match e with
  +  | Patterns.Lambda (x, body) -> sprintf "ERROR LAMBDA NOT SUPPORTED!"
  +  | Patterns.Call (None, op, elist) -> 
  +    match op.Name with
  +      | OperatorName opname -> sprintf "%s %s %s" (prettyprint elist.[0]) opname (ccodegen elist.[1]) 
  +      | "GetArray" -> sprintf "%s[%s]" (ccodegen elist.[0]) (ccodegen elist.[1])
  +      | _ -> sprintf "ERROR CALL %s(%s)" op.Name (String.concat ", " (List.map ccodegen 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))
  +      (String.concat "\n\t" (List.mapi (fun index elem -> sprintf "%s[%d] = %s;" var.Name index (ccodegen 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
  +    | LambdaN (inputs, body) -> extractHeader body (List.append curInputs inputs) statements
       | Patterns.Let(x, e1, e2) -> extractHeader e2 curInputs (List.append statements [(x, e1)])
       | _ -> (exp, curInputs, statements)
     let (result, inputs, statements) = extractHeader e [] []
  
positive.code:   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. *)
  let rec cpreprocess (e: Expr): Expr = 
    match e with 
    | Patterns.Let(tp, e1, e2) -> Expr.Let(tp, cpreprocess e1, cpreprocess e2)
    | Patterns.Value(v, tp) -> e
    | Patterns.Lambda (x, body) -> Expr.Lambda(x, cpreprocess body)
    | Patterns.NewArray(tp, elems) -> 
      let variable = new Var(newVar "array", tp.MakeArrayType())
      Expr.Let(variable, e, Expr.Var(variable))
    | Patterns.Call (x, op, elist) -> 
      Expr.Call(op, List.map cpreprocess elist)
    | _ -> e
  
  (* The entry point for the compiler which invokes different phases and code generators *)
  let compile (moduleName: string) (methodName: string) = 
  
negative.code: ﻿module compiler
  
  open Microsoft.FSharp.Quotations
  open cruntime
  
  let (|OperatorName|_|) methodName =
    match methodName with
  