Returns all elements whose key equals key.
Details
The returned ordered_sequence can be inspected with as.list().
Examples
x <- ordered_sequence("a", "b", "c", keys = c(1, 2, 2))
out <- peek_all_key(x, 2)
as.list(out)
#> [[1]]
#> [1] "b"
#>
#> [[2]]
#> [1] "c"
#>