We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c209f9 commit 94f19a6Copy full SHA for 94f19a6
src/main/scala/scalatutorial/sections/SyntacticConveniences.scala
@@ -353,7 +353,7 @@ object SyntacticConveniences extends ScalaTutorialSection {
353
*/
354
def repeatedParameters(res0: Double): Unit = {
355
def average(x: Int, xs: Int*): Double =
356
- (x :: xs.to(List)).sum.toDouble / (xs.size + 1)
+ (x :: xs.toList).sum.toDouble / (xs.size + 1)
357
358
average(1) shouldBe 1.0
359
average(1, 2) shouldBe 1.5
0 commit comments