summaryrefslogtreecommitdiff
path: root/docs/type_system/select.md
blob: 5cee24a94c02f3c4faedc09a4aeb19f5382e97b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Select

---

A symbol associated with a type

```text
Select[[SINGLE | MULTIPLE] Type; Collection[VAR_TREE_LIST; .symbol : %const Value]]
```

# Alias

```text
Enum[Generic.T; Collection[.symbol : %const Value]] `alias Select[[SINGLE]; Generic.T; Collection[VAR_TREE_LIST; .symbol : %const Value]]

Mask[Generic.T; Collection[.symbol : %const Value]] `alias Select[[MULTIPLE]; Generic.T; Collection[VAR_TREE_LIST; .symbol : %const Value]]
```

## Definition Example

```text
E : Enum[I64; .a; .b; .c]
`log E // Enum[I64; .a : 0; .b : 1; .c : 2]
```