I am currently working on some function that takes in two numbers in Scala (I have only worked with Scala once in the past for a few weeks).
I need to iterate a loop between two numbers; a and b.
So if a = 0, b = 10, I want to loop from 0 to 10, if a = 10, b = 0, I wants to loop from 10 to 0.
I want to do this in the most efficient way, how can I do this?