chicken_turtle_util.function¶
Function manipulation, like functools. Contains only compose, compose functions.
compose |
Compose functions |
-
chicken_turtle_util.function.compose(*functions)[source]¶ Compose functions
Like the
ooperator in math.Parameters: functions : collection(any -> any)
Collection of one or more functions to compose.
Returns: any -> any
Function composed of functions
Raises: ValueError
When
len(functions) < 1Examples
compose(f1, f2)is equivalent tof1 o f2, or tolambda x: f1(f2(x))