     if hash != @hash
       new BitmapIndexedNode().with(shift, @hash, this).with(shift, hash, leaf)
     else
-      new CollisionNode(hash, this.bucketWithout(leaf.key).concat([leaf]))
+      newBucket = this.bucketWithout(leaf.key)
+      newBucket.push leaf
+      new CollisionNode(hash, newBucket)
 
   without: (shift, hash, key) ->
     switch @bucket.length

# A dense interior node with room for 32 entries.
class ArrayNode
  constructor: (baseTable, i, node, @size) ->
    @table = baseTable[0..]
    @table[i] = node

  each: (func) ->
    for node in @table

      result = step(result, x)
    result

  arrayWith: (a, i, x) ->
    (if j == i then x else a[j]) for j in [0...a.length]

  arrayWithInsertion: (a, i, x) ->
    (if j < i then a[j] else if j > i then a[j-1] else x) for j in [0..a.length]

  arrayWithout: (a, i) ->
    a[j] for j in [0...a.length] when j != i


  mask: (key, shift) -> (key >> shift) & 0x1f
