-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Add a compose function
In computer science, function composition is an act or mechanism to combine simple functions to build more complicated ones. Like the usual composition of functions in mathematics, the result of each function is passed as the argument of the next, and the result of the last one is the result of the whole.
Source: Wikipedia
Usage examples
from pyfunctools.compose import compose
add_one = lambda x: x + 1
double = lambda x: x * 2
compose(add_one, double)(1) # -> 3Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request