thatfor exampleto dofrom toolz functoolz import juxt juxt([is_lt is_gt is_prime])( (truetruetrueall(juxt([is_lt is_gt is_prime])( )true juxt([is_lt is_gt is_prime])( (falsetruetruethe utility higher-order functions shown here are just small selection to illustrate composability look at longer text on functional programming--orfor exampleread the haskell prelude--for many other ideas on useful utility higher-order-functions the operator module as has been shown in few of the examplesevery operation that can be done with python' infix and prefix operators corresponds to named function in the operator module for places where you want to be able to pass function performing the equivalent of some syntactic operation to some higher-order functionusing the name from operator is faster and looks nicer than corresponding lambda for examplecompare ad hoc lambda with `operatorfunction sum reduce(lambda aba+biterable sum reduce(operator additerable sum sum(iterablethe actual pythonic way the functools module the obvious place for python to include higher-order functions is in the functools moduleand indeed few are in there howeverthere are surprisingly few utility higher-order functions in that module it has gained few interesting ones over python versionsbut core developers have resistence to going in the direction of full functional programming language on the other handas we have seen in few example abovemany of the most useful higherorder functions only take few lines (sometimes single lineto write yourself apart from reduce()which is discussed at the start of this the main facility in the module is partial()which has also been higher-order functions