dequer
dequer copied to clipboard
`as.queue` and related don't work directly on vectors
For instance, if I pass a 3-element vector directly into as.queue, it gives me a queue with 1 element. I would expect it to have 3 elements. For example:
require('dequer')
(as.queue(c(1, 2, 3)))
# A queue with 1 element
(as.queue(as.list(c(1, 2, 3))))
# A queue with 3 elements
I wonder if this is intended behaviour? As it is, it means I'm having to call as.list on every dataset before I turn it into a queue, which is a bit messy. I don't know if that incurs a performance overhead, however.