It should be easy, but I make it hard for myself! I created a reverse For loop to iterate over the set. If there are ten numbers in the set, I could just do it;
for d in (0..<10).reverse() {
print(d)
}
but I want to combine with Int, then recount in the set as follows:
If myInt = 7, then I want to add 7 to the array (which I can do), but also add; 6,5,4,3,2,1,9,8 to the array in this order.
Appreciate the help!
source
share