We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1270fe commit 0ad4796Copy full SHA for 0ad4796
019-day/Program37.py
@@ -2,4 +2,20 @@
2
#Higher order function is called a function that take a function as parameter and perform that function inside the function and return the result
3
4
#State
5
-#Each Object/Instance have their on property value. This property value is call State.
+#Each Object/Instance have their on property value. This property value is call State.
6
+
7
+#Example of higher order function
8
9
+def add(x,y):
10
+ return x + y
11
12
+def multiply(x,y):
13
+ return x * y
14
15
+def calculator(x, y, func):
16
+ return func(x,y)
17
18
+print(calculator(3,2,add))
19
+print(calculator(10,5, multiply))
20
21
+#In the above `calculator` function is the higher order function
0 commit comments