summaryrefslogtreecommitdiff
path: root/docs/type_system/union.md
blob: f2c4ae0e175cb823511c80785fcf3e1ffb33a730 (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
25
26
27
# Union

---

```text
Union[TYPE.symbol; ...]
```

```text
u : Union[I64.a; I64.b; I64.c] $ (.c : 5)

# u {
    .c { c ... }[c]
    { ... } // default
}
```
## Alias

```text
Result[ANY] `alias Union[ANY.value; Error.error]
```

## \`take

```text
value : .value `take 10 / var
```