anchor.diff:      | Patterns.Let(x, e1, e2) ->
         let (te1, liftedLets1) = constructTopLevelLets boundVars e1
         let (te2, liftedLets2) = constructTopLevelLets (x :: boundVars) e2
  -      if(not (List.exists (fun y -> not(y = x)) (listDiff (List.ofSeq (te1.GetFreeVars())) boundVars))) then
  -        (te2, (x, te1) :: (List.append liftedLets1 liftedLets2))
  +      if (List.isEmpty (listDiff (List.ofSeq (e1.GetFreeVars())) boundVars)) then
  +        (te2, List.append liftedLets1 ((x, te1) :: liftedLets2))
         else 
           (Expr.Let(x, te1, te2), List.append liftedLets1 liftedLets2)
       | Patterns.Call (None, op, elist) -> 
  
positive.code:     | _ -> (exp, [])
    let (inputs, body) = match e with TopLevelFunction (i, b) -> (i, b)
    let (te, ll) = constructTopLevelLets inputs body
    LambdaN(inputs, LetN(ll, te))
    
  
  
negative.code: (* Performs a simple kind of ANF conversion for specific statements. *)
  let rec anfConversion (letRhs: bool) (e: Expr): Expr = 
    match e with 
    | Patterns.Let(x, e1, e2) when not letRhs -> Expr.Let(x, anfConversion true e1, anfConversion false e2)
    | Patterns.Value(v, tp) -> e
    | Patterns.Lambda (x, body) -> Expr.Lambda(x, anfConversion false body)
    | Patterns.NewArray(tp, elems) when not letRhs -> 
  