## hash tracking, uses a hash to detect potential collisions, 1 means a value
## is added, >1 means a value was added and tracking array had to be resized
## to that size, 0 means it existed already, NA is a reset instruction, value
## following a reset instruction is what the reset was to
# one resize

keys <- c("a", "b", NA, 1, "b", "hello", "goodbye", "a", NA, 
    3, "hello", "goodbye", "b")

collisions <- c("f b", "n b", "n d", "t m", "b r", "n w", "q w", 
    "o x")

# all of these resolve to the same hash value, so should all be stored under
# the same spot in the hash table.  We use this to test that additions and
# removals from pairlists work

keys.1 <- c(collisions, NA, 0, collisions)

keys.2 <- c(collisions, NA, 4, collisions)

vetr:::hash_test2(c(collisions[1:3], collisions[1:3], "hello"), 
    c(T, T, T, F, F, F, F))

# test additions and deletions under collisions

function(x, y) NULL
<environment: 0x7ff55becb388>

fun2 <- function(x) vetr:::find_fun(quote(x), environment())