dequer icon indicating copy to clipboard operation
dequer copied to clipboard

`as.queue` and related don't work directly on vectors

Open multimeric opened this issue 5 years ago • 0 comments

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.

multimeric avatar Feb 16 '21 06:02 multimeric