anchor.diff:  module FSharpx.DataStructures.Vector
   
   open FSharpx
  -
  -type Node = obj[]
  +open System.Threading
  +
  +type Node(thread,array:obj[]) =
  +    let thread = thread
  +    
  +    with
  +        member this.Array = array
  +        member this.Thread = thread
  +        member this.SetThread t = thread := t
  +
  +let newNode() = Node(ref Thread.CurrentThread,Array.create 32 null)
  +let emptyNode() = Node(ref null,Array.create 32 null)
   
   type TransientVector<'a> (count,shift:int,root:Node,tail:obj[]) =
       let mutable count = count
  
positive.code:             // else alloc new path
              //return  nodeToInsert placed in copy of parent
              let subidx = ((count - 1) >>> level) &&& 0x01f
              let ret = Array.copy parent
  
              let nodeToInsert =
                  if level = 5 then tailnode else
  
                  let child = parent.[subidx]
                  if child <> null then
                      this.PushTail(level-5,child :?> Node,tailnode)
                  else
                      this.NewPath(level-5,tailnode)
  
              ret.[subidx] <- nodeToInsert :> obj
              ret
  
          member internal this.ArrayFor<'a> i =
  
negative.code:     let mutable tail = tail
      let mutable shift = shift
  
      new() = TransientVector<'a>(0,5,newNode(),Array.create 32 null)
      
      with
          member internal this.EnsureEditable(node:Node) =
              if node.Thread = root.Thread then node else
              Node(root.Thread,Array.copy node.Array)
  
          member internal this.NewPath(level,node:Node) =
              if level = 0 then node else
              let ret = Array.create 32 null
              ret.[0] <- this.NewPath(level - 5,node) :> obj
              Node(node.Thread,ret)
  
          member internal this.PushTail(level,parent:Node,tailnode) =
              //if parent is leaf, insert node,
              // else does it map to an existing child? -> nodeToInsert = pushNode one more level
              // else alloc new path
              //return  nodeToInsert placed in copy of parent
              let parent = this.EnsureEditable parent
              let subidx = ((count - 1) >>> level) &&& 0x01f
              let ret = parent
  
              let nodeToInsert =
                  if level = 5 then tailnode else
  
                  let child = parent.Array.[subidx]
                  if child <> null then
                      this.PushTail(level-5,child :?> Node,tailnode)
                  else
                      this.NewPath(level-5,tailnode)
  
              ret.Array.[subidx] <- nodeToInsert :> obj
              ret
  
          member internal this.ArrayFor<'a> i =
  