Higher-order functions
Functions taking other functions as arguments or returning functions as results. Higher-order functions enable flexible, reusable code.
Real World
Spotify's Discover Weekly uses higher-order functions internally — applying map to transform listening data and filter to remove already-heard tracks before generating playlists.
Exam Focus
Name the specific higher-order function (map, filter, or fold) rather than saying 'a function that takes a function' to secure definition marks.
How well did you know this?