0

When should we pass function as argument to another function ?

We can simply call one function in another, then what is the advantage of passing a function as argument to other function ??

27th Jun 2017, 2:16 PM
Shubham Menkudle
Shubham Menkudle - avatar
1 Odpowiedź
+ 3
the thing that you said is called "functional programming" Functional programming can be advantageous when you are going to be performing lots of different operations on data that has a fixed, known amount of variation. In functional languages the program is structured such that it treats computation as the evaluation of mathematical functions. And this is really good for: Gaming and Artificial Intelligence. Read more here https://cheeze.club/45pp
27th Jun 2017, 2:21 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar