if you try to iterate over ::Symbol you get an error:
for i in :c @show i end
ERROR: MethodError: no method matching iterate(::Symbol)
however it works fine with Int:
for i in 5 @show i end
i = 5
note also that it works for:
for i in [:c] @show i end
Is there a solution for this?
This is the solution, isn’t it?
Integers are iterable (I think for convenience, but have to search for the why), but not everything is iterable.
Another solution would be to implement
Number has been usefull before broadcasting was introduced in Julia 0.5. See discussions below.
Here is listed what is iterable:
Some discussion is found here:
Linked from here:
Is there a rationale behind for not having
Yes, there is no point to it.
As in the discussions above stated: there is not much rationale behind making