Skip to content

compose(callables)

Apply a sequence of callables to a value.

Each callable receives the result of the previous callable as its first argument.

Args:
callables: An iterable of callables to apply sequentially.

Returns:
A wrapper that applies the callables to a value and returns the final result.
If no callables are provided, the original value is returned unchanged.

Raises:
TypeError: If callables is not iterable or contains a non-callable item.