From 5a4fdd36b8f74ee7e86b4b54ae6e8a0d4a13bba5 Mon Sep 17 00:00:00 2001 From: xhudik Date: Tue, 30 Mar 2021 22:04:48 +0200 Subject: [PATCH] use def instead of val --- src/main/scala/scalatutorial/sections/StandardLibrary.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/scalatutorial/sections/StandardLibrary.scala b/src/main/scala/scalatutorial/sections/StandardLibrary.scala index 9b776c99..7434c96f 100644 --- a/src/main/scala/scalatutorial/sections/StandardLibrary.scala +++ b/src/main/scala/scalatutorial/sections/StandardLibrary.scala @@ -136,7 +136,7 @@ object StandardLibrary extends ScalaTutorialSection { * Complete the definition insertion sort by filling in the blanks in the definition below: */ def insertionSort(res0: (Int, Int) => Boolean, res1: List[Int]): Unit = { - val cond: (Int, Int) => Boolean = res0 + def cond(a: Int, b: Int): Boolean = res0 def insert(x: Int, xs: List[Int]): List[Int] = xs match { case List() => x :: res1