Lists in Practice
Overview
A practical list example using mutation, sorting, and counting.
Syntax
echo
items: list = [3, 1, 2, 3];Example
echo
items: list = [3, 1, 2, 3];
items.push(5);
items.order();
say(items);
say(items.countOf(3));Output
text
[1, 2, 3, 3, 5]
2Notes
order()sorts the list in place.countOf()counts exact value matches.
