From 1f988331187533e353fe3345675dfbc4be1ecfee Mon Sep 17 00:00:00 2001 From: Wen Date: Wed, 26 Jun 2019 21:52:30 +0100 Subject: [PATCH] fix key word bug type of result should be a val rather than def --- src/main/scala/stdlib/HigherOrderFunctions.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/stdlib/HigherOrderFunctions.scala b/src/main/scala/stdlib/HigherOrderFunctions.scala index c3a83cfd..bcae6cf2 100644 --- a/src/main/scala/stdlib/HigherOrderFunctions.scala +++ b/src/main/scala/stdlib/HigherOrderFunctions.scala @@ -58,7 +58,7 @@ object HigherOrderFunctions */ def differentLookHigherOrderFunctions(res0: Int) { def lambda = (x: Int) ⇒ x + 1 - def result = lambda(5) + val result = lambda(5) result should be(res0) }