Reversing order of `prod(itr)`

You realize that you can’t rely on this? The ordering of a Dict may change unpredictably as you add elements, or if you update Julia to a new version. Don’t use Dict if you want a specific iteration order; use something else like the OrderedDict type in the OrderedCollections.jl package.

Don’t accumulate strings this way — every iteration of your loop allocates and copies into a new string. See this discussion: Accumulating strings dynamically - #3 by stevengj

6 Likes