O'Reilly logo

Functional Python Programming by Steven Lott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required