Composite design
The common mathematical notation for a composite function looks as follows:
The idea is that we can define a new function, , that combines two other functions, and .
Python's multiple-line definition of the form is as follows:
@f def g(x): something
This is vaguely equivalent to . The equivalence isn't very precise because the @f
decorator ...
Get Functional Python Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.