Returns the first element whose key equals key.
Examples
x <- ordered_sequence("a", "b", "c", keys = c(1, 2, 2))
peek_key(x, 2)
#> [1] "b"
peek_key(x, 10)
#> NULL
Returns the first element whose key equals key.
x <- ordered_sequence("a", "b", "c", keys = c(1, 2, 2))
peek_key(x, 2)
#> [1] "b"
peek_key(x, 10)
#> NULL