Composite design

The common mathematical notation for a composite function looks as follows:

Composite design

The idea is that we can define a new function, Composite design, that combines two other functions, Composite designand Composite design.

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.