versatility metaclasses are the last tool to reach for rather than the firstexcept perhaps for application framework developers who need to provide powerful facilities to their users without making the users go through hoops to realize the benefits on offer functional-style programming ||functional-style programming is an approach to programming where computations are built up from combining functions that don' modify their arguments and that don' refer to or change the program' stateand that provide their results as return values one strong appeal of this kind of programming is that (in theory)it is much easier to develop functions in isolation and to debug functional programs this is helped by the fact that functional programs don' have state changesso it is possible to reason about their functions mathematically three concepts that are strongly associated with functional programming are mappingfilteringand reducing mapping involves taking function and an iterable and producing new iterable (or listwhere each item is the result of calling the function on the corresponding item in the original iterable this is supported by the built-in map(functionfor examplelist(map(lambda xx * [ ])returns[ the map(function takes function and an iterable as its arguments and for efficiency it returns an iterator rather than list here we forced list to be created to make the result clearer[ * for in [ ]returns[ generator expression can often be used in place of map(here we have used list comprehension to avoid the need to use list()to make it generator we just have to change the outer brackets to parentheses filtering involves taking function and an iterable and producing new iterable where each item is from the original iterable--providing the function returns true when called on the item the built-in filter(function supports thislist(filter(lambda xx [ - - ])returns[ the filter(function takes function and an iterable as its arguments and returns an iterator [ for in [ - - if returns[