Let's say , I am concatenating structs into an array with an append()
call. Will the range operator during the read process guarantee the same order as elements were added to the array?
var array_of_structs []*some_struct_t
build_array(&array_of_structs)
for i,value := range array_of_structs {
..whatever, but I need `i` to be i=0,1,2... N in an ordered way
}
What do the specs say? I am going to calculate money, so I need to be sure it is ordered.