File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,10 @@ object HigherOrderFunctions
8686 result2 should be(res1)
8787 }
8888
89- /** We can take that closure and throw it into a method and it will still hold the environment:
89+ /** And then we get to Higher Order Functions:
90+ * Higher Order Functions are functions that take functions as arguments and/or return functions.
91+ *
92+ * We can take that closure and throw it into a Higher Order Function and it will still hold the environment:
9093 */
9194 def holdEnvironmentHigherOrderFunctions (res0 : Int , res1 : Int ) {
9295 def summation (x : Int , y : Int ⇒ Int ) = y(x)
@@ -102,7 +105,7 @@ object HigherOrderFunctions
102105 result2 should be(res1)
103106 }
104107
105- /** Function returning another function:
108+ /** Higher Order Function returning another function:
106109 */
107110 def returningFunctionHigherOrderFunctions (res0 : Boolean , res1 : Int , res2 : Int ) {
108111 def addWithoutSyntaxSugar (x : Int ): Function1 [Int , Int ] = {
You can’t perform that action at this time.
0 commit comments