Most elegant repeat loop in Scala

前端 未结 4 876
遇见更好的自我
遇见更好的自我 2021-02-01 01:56

I\'m looking for an equivalent of:

for(_ <- 1 to n)
  some.code()

that would be shortest and most elegant. Isn\'t there in Scala anything si

4条回答
提交回复
热议问题