UpTo
A count specification meaning at most n, taking fewer when fewer are available.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
UpTo✓Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer) -> unknown | combinatorics | always |
Details
- Never reduces by itself: a count specification other heads read, not a value.
- In Take, takes at most n elements with no error when fewer are available.
- In Partition, allows a shorter final chunk instead of dropping the ragged remainder.
- In Ordering, the same clamping a plain integer count already gives — at most n positions, fewer if the collection is shorter.
Examples
Basic #
About
| Examples | 9 |
|---|---|
| Checked against | Wolfram Language 9 agree |
| Crosswalk | Wolfram Language |