ADVANCED TOPICS IN COMPILER DESIGN
CODE GENERATION FOR OBJECT ORIENTED LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Fold
|
|
Map
|
|
Filter
|
|
Sum
|
Detailed explanation-1: -Higher order functions are functions that operate on other functions, either by taking them as arguments or by returning them. In simple words, A Higher-Order function is a function that receives a function as an argument or returns the function as output.
Detailed explanation-2: -A higher order function is a function that can take conditions or functions as arguement. And it can optionally output a function as the return statement . therefore, recursive functions are not all higher level functions.
Detailed explanation-3: -What higher-order function takes a list of values and repeatedly applies a function to accumulate a single data value? Reducing.
Detailed explanation-4: -A higher order function is a function that takes a function as an argument, or returns a function . Higher order function is in contrast to first order functions, which don’t take a function as an argument or return a function as output.