Bug in `reverse!`?

Ranges are not mutable types, so there’s no in-place reverse! for them:

julia> typeof(1:1:2).mutable
false

If you’re trying to use the same code on both ranges and vectors, you might be interested in BangBang.jl instead, but it doesn’t yet have a reverse!! method. (Maybe someone want’s to write a PR?)

1 Like