You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curry: by default, TypeError if args remaining when exiting top-level curry context; enh: accept just tuple as the pythonic multiple-return-values thing (not liśt); greppability: always use ordering (list, tuple) in cases where both are ok
Both one-in-one-out (*1-to-1*) and n-in-m-out (*n-to-m*) pipes are provided. The 1-to-1 versions have names suffixed with ``1``. The use case is one-argument functions that return one value (which may also be a tuple or list).
226
+
Both one-in-one-out (*1-to-1*) and n-in-m-out (*n-to-m*) pipes are provided. The 1-to-1 versions have names suffixed with ``1``. The use case is one-argument functions that return one value (which may also be a tuple).
227
227
228
-
In the n-to-m versions, when a function returns a tuple or list, it is unpacked to the argument list of the next function in the pipe. At ``getvalue`` or ``runpipe`` time, the tuple wrapper (if any) around the final result is discarded if it contains only one item. (This allows the n-to-m versions to work also with a single value, as long as it is not a tuple or list.) The main use case is computations that deal with multiple values, the number of which may also change during the computation (as long as there are as many "slots" on both sides of each individual connection).
228
+
In the n-to-m versions, when a function returns a tuple, it is unpacked to the argument list of the next function in the pipe. At ``getvalue`` or ``runpipe`` time, the tuple wrapper (if any) around the final result is discarded if it contains only one item. (This allows the n-to-m versions to work also with a single value, as long as it is not a tuple.) The main use case is computations that deal with multiple values, the number of which may also change during the computation (as long as there are as many "slots" on both sides of each individual connection).
229
229
230
230
231
231
### Introduce local bindings: ``let``, ``letrec``
@@ -1096,9 +1096,9 @@ Some overlap with [toolz](https://github.com/pytoolz/toolz) and [funcy](https://
1096
1096
- As a regular function, `curry` itself is curried à la Racket. If it gets extra arguments (beside the function ``f``), they are the first step. This helps eliminate many parentheses.
1097
1097
-**Caution**: If the positional arities of ``f`` cannot be inspected, currying fails, raising ``UnknownArity``. This may happen with builtins such as``operator.add``.
1098
1098
-`composel`, `composer`: both left-to-right and right-to-left function composition, to help readability.
1099
-
- Any number of positional arguments is supported, with the same rules asin the pipe system. Multiple return values packed into a tupleorlistare unpacked to the argument list of the next function in the chain.
1099
+
- Any number of positional arguments is supported, with the same rules asin the pipe system. Multiple return values packed into a tuple are unpacked to the argument list of the next function in the chain.
1100
1100
-`composelc`, `composerc`: curry each function before composing them. Useful with passthrough.
1101
-
-`composel1`, `composer1`: 1-in-1-out chains (faster; also useful for a single value that is a tupleorlist).
1101
+
-`composel1`, `composer1`: 1-in-1-out chains (faster; also useful for a single value that is a tuple).
1102
1102
- suffix `i` to use with an iterable (`composeli`, `composeri`, `composelci`, `composerci`, `composel1i`, `composer1i`)
0 commit comments