in the last we saw an iterator algebra that builds on the iter tools module in some wayshigher-order functions (often abbreviated as "hofs"provide similar building blocks to express complex concepts by combining simpler functions into new functions in generala higher-order function is simply function that takes one or more functions as arguments and/or produces function as result many interesting abstractions are available here they allow chaining and combining higher-order functions in manner analogous to how we can combine functions in itertools to produce new iterables few useful higher-order functions are contained in the functools moduleand few others are built-ins it is common the think of map()filter()and functools reduce(as the most basic building blocks of higher-order functionsand most functional programming languages use these functions as their primitives (occasionally under other namesalmost as basic as map/filter/reduce as building block is currying in pythoncurrying is spelled as partial()and is contained in the functools module--this is function that will take another functionalong with zero or more arguments to pre-filland return function of fewer arguments that operates as the input function would when those arguments are passed to it the built-in functions map(and filter(are equivalent to comprehensions--especially now that generator comprehensions are available--and most python programmers find the comprehension versions more readable for examplehere are some (almostequivalent pairs