In Scala, you often use an iterator to do a for loop in an increasing order like:
for
for(i <- 1 to 10){ code }
How would you d
for (i <- 10 to (0,-1))
The loop will execute till the value == 0, decremented each time by -1.