Data structures
- List: values of one type, in order. Walk, sort, map, select.
- Map: find a value by key (
Int,StringorBytes), in insertion order. Lookups and counters. - Set: each
Int,StringorBytesonce, in first-added order. Duplicates and membership. - Queue (
std/queue): first in, first out, of strings. - Heap (
std/heap): a priority queue of any type;popgives the first value in your order. - Range:
0...ncounts without a list. Use it infor. - Bytes: a compact immutable byte string, for digests, file contents and wire formats. Slice, join, compare.
- Lazy: a recipe of steps over a list, a range or an endless source, run one item at a time.
- Optional:
some(value)ornone, for a value that may be missing. - Structs and enums: fixed named fields, or named cases.
All values are immutable. New to these? Read the tour pages Lists and Maps first.