assuming that you know more than I do (a likely circumstance), how do you 
explain...

qbs = Queue{ByteString}("1234")   # ok
typeof(qbs)                                      # --> 
DataStructures.Queue{ByteString}
length(qbs)                                      # --> 4, presumably the 
result of enqueuing "1", "2", "3", "4" as you suggest
                                                        # then, why does 
the following...
dequque!(qbs)                                 # fails with MethodError: 
`shift!` has no method matching shift!(::ASCIIString)
# why not just produce "1" (or "4")?

On Thursday, February 4, 2016 at 1:52:51 PM UTC-8, Stefan Karpinski wrote:
>
> The Queue constructor (like all collection constructors) takes a 
> collection which it iterates over and converts each value it gets to the 
> expected element type – in this case ByteString. If you iterate over "1234" 
> you get '1' then '2' then '3' then '4' – each of which is converted to a 
> string and then inserted into your queue.
>
>

Reply via email to