Closed BASS10 closed 3 years ago
I get an error when I try to use map on a circular array. It seems like this should work but perhaps I am missing something.
e.g. map(x -> x+1, CircularArray([1,2,3,4])) throws an error...
map(x -> x+1, CircularArray([1,2,3,4]))
ERROR: MethodError: similar(::CircularVector{Int64, Vector{Int64}}, ::Type{Int64}, ::Tuple{Base.OneTo{Int64}}) is ambiguous. Candidates: ..............
reduce seems to work which slightly surprised me given the above reduce(+, CircularArray([1,2,3,4])) 10
reduce(+, CircularArray([1,2,3,4]))
10
Looks like there is another ambiguity with Base to resolve.
Wow, that was quick!
Thanks for this handy package and the support.
All the best.
I get an error when I try to use map on a circular array. It seems like this should work but perhaps I am missing something.
e.g.
map(x -> x+1, CircularArray([1,2,3,4]))
throws an error...reduce seems to work which slightly surprised me given the above
reduce(+, CircularArray([1,2,3,4]))
10