
Three built-in collection types. All are generic and mutable. See [Collections and strings](/docs/collections/) for methods.

```vary
let nums: List[Int] = [1, 2, 3]
let ages: Dict[Str, Int] = {"Alice": 30, "Bob": 25}
mut seen: Set[Int] = {1, 2, 3}
```

Lists support indexing and slicing (`nums[0]`, `nums[1:3]`). Dicts support key access (`ages["Alice"]`). Sets support operators (`a | b`, `a & b`).

Collection literals, tuples, and function calls can span multiple lines with trailing commas:

```vary
let items = [
    "alpha",
    "beta",
    "gamma",
]
```

## Comprehensions

```vary
let squares = [x * x for x in range(10)]
let evens = [x for x in range(20) if x % 2 == 0]
let unique = {x % 5 for x in range(20)}
let lookup = {str(i): i * i for i in range(5)}
```

Each comprehension allows one `for` clause and an optional `if` filter.
