anchor.diff:      let bound = HashSet()
       let rec rem expr =
           match expr with
  -        | Lambda (Some this, args, body) -> 
  -            bound.Add this |> ignore
  +        | Lambda (Some this, args, body) ->
  +            bound.Add(this) |> ignore
               let bodyTr = Transform rem body
  -            if bound.Contains this then
  -                 bound.Remove this |> ignore
  +            if bound.Remove(this) then
                    Lambda (None, args, bodyTr)
               else
                    Lambda (Some this, args, bodyTr)
  -        | Var v when bound.Contains v ->
  -            bound.Remove v |> ignore
  +        | Var v ->
  +            bound.Remove(v) |> ignore
               expr
  -        | _ -> Transform rem expr  
  -
  +        | _ ->
  +            Transform rem expr
       rem expr
   
   /// Transforms local Let- or LetRecursive-bound curried lambda functions to
  
positive.code:     let step expr =
          match expr with
          | Application (Lambda (None, args, body), xs) ->
              let rec binds args xs body =
                  match args, xs with
                  | a :: args, x :: xs -> Let (a, x, binds args xs body)
                  | [], [] -> body
                  | [], _ -> Application(body, xs)
                  | _, [] -> Lambda(None, args, body)
              binds args xs body
          | Application (Let (var, value, body), xs) ->
              Let (var, value, Application (body, xs))
          | Lambda (None, [x], Application (f, [Var y])) ->
              if x = y && isPure f then f else expr
          | Let (var, Let (v, vl, bd), body) ->
              Let (v, vl, Let (var, bd, body))
          | Let (var, value, Application (f, [Var v])) when v = var && isPure f ->
              Application(f, [value])
          | Let (var, value, body) when not var.IsMutable ->
              match value with
              | Constant _ | Global _ | Runtime ->
  
negative.code:                         else inlineLet expr var value body
                  else expr
              | _ ->
                  match occurenceCountApprox var body with
                  | 0 -> if isPure value then body else Sequential (value, body)
                  | 1 -> inlineLet expr var value body
                  | _ -> expr
          | Sequential (a, b) when isPure a ->
              b
          | _ ->
  