File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,19 @@ def starcompose(
176
176
...
177
177
178
178
179
- def starcompose (* fns : Callable [[Any ], Any ]) -> Callable [[Any ], Any ]:
179
+ def starcompose (* fns : Callable [..., Any ]) -> Callable [..., Any ]:
180
+ """Compose multiple functions left to right.
181
+
182
+ Composes zero or more functions into a functional composition. The
183
+ functions are composed left to right. A composition of zero
184
+ functions gives back the identity function.
185
+
186
+ The first function must accept a variable number of positional
187
+ arguments and if it returns a tuple, the subsequent functions must
188
+ accept the same number of arguments as the length of the tuple of
189
+ the previous function.
190
+ """
191
+
180
192
def _compose (source : Any ) -> Any :
181
193
"""Return a pipeline of composed functions."""
182
194
return reduce (lambda fields , f : f (* fields ), fns , source )
You can’t perform that action at this time.
0 commit comments