Is it possible to create an inverted Range
?
I mean one that goes from 99 to 1, instead of the other way around. My goal is to iterate the values from 99 to 1.
This doesn't compile, but it should give you an idea of what I'm trying to do:
for i in 99...1{
print("\(i) bottles of beer on the wall, \(i) bottles of beer.")
print("Take one down and pass it around, \(i-1) bottles of beer on the wall.")
}
Wha's the easiest way of achieving this in Swift
?