summaryrefslogtreecommitdiff
path: root/docs/type_system/group.md
blob: 213e3e0ed17c7f2d92909a13e9b03520fed218c5 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Group

---

A sequence of different types accessed by index or a symbol mapped to an index

```text
Group[[INDEX | SYMBOL] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
```

## Type Body Object Definitions

```c
typedef struct {
    kpl_ptr var_tree, var_list;
} kpl_type_body_group;
```

# Alias

```text
Tuple[Collection[TYPE.SYMBOL]] `alias Group[[INDEX] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]

Table[Collection[TYPE.SYMBOL]] `alias Group[[SYMBOL] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
```

# Operators

## Symbol Access

## ``get`

## ``set`

```text
Result[Void] : target `set (KEY; VALUE)

items : Tuple $ (1; 2; 3)
items `set (0; 4)
// ^ items.0 {[i] i : 4 }
`log items // Tuple[I64; I64; I64] $ (4; 2; 3)
```

# Destructuring

# Mutating