First day and first attempt at using Scala - so go easy on me! I\'m trying to rewrite some old Java code I have which is simply a function which takes two numbers and prints
highnum to lownum by -1 (switch with other negative or positive step to change stepping)
def decrement(start: Int, finish: Int) = {
for (i <- start to finish by -1) {
println("Current value (decreasing from "+start+" to "+finish+") is "+i)
}
}
I think this is a dupe of Scala downwards or decreasing for loop?