list
| Input Stack: |
⇨ |
Output Stack: |
Pop all items currently on the stack and create a list containing them. The order in the
list preserves the stack order, with the bottom stack item becoming the first list element.
Parameters
- ...: All items currently on the stack (variable number of arguments)
Examples
Creating a list from two items:
a,b,:list
| Pos | Input | Output |
| 0 |
b |
List(b, a) |
| 1 |
a |
|
Note that a was added to the stack first and appears as the first element in the list,
while b was added second and appears as the second element.
Creating an empty list:
,:list
- :each - Execute a function for each element in a list
- :map - Transform each element in a list
- :format - Use lists as arguments for string formatting
- :by - Use lists to specify grouping keys