Related questions
Scala downwards or decreasing for loop?
In Scala, you often use an iterator to do a for loop in an increasing order like:
for(i <- 1 to 10){ code }
How would you do it so it goes from 10 to 1? I guess 10 to 1 gives an empty iterator (…
Scala "<-" for comprehension
I have found that Scala always has a "natural explanation" to anything. Always something like "ohh, but that's just a function being called on this and that object with this and that parameter". In a sense, nothing is really compiler-magic …
How to call a method n times in Scala?
I have a case where I want to call a method n times, where n is an Int. Is there a good way to do this in a "functional" way in Scala?
case class Event(name: String, quantity: Int, value: …