Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is a higher-order function?
Consider how it interacts with other functions.
Give an example of a higher-order function.
Think about functions that invoke other functions.
What is a higher-order function?
Consider the definition we discussed.
True or False: Higher-order functions can modify their own behavior by accepting functions as parameters.
Consider flexibility.
Create a function called compose_functions that takes two functions as arguments and returns a new function that invokes both functions sequentially with the same input.
Think about how to pass output from one function into another.
Implement a decorator function that takes a function as an argument, logs its input, and returns a new function.
Consider how decorators wrap the behavior of functions.
4 more questions in this section. Enroll free to practise them all.
Enroll free