summaryrefslogtreecommitdiff
path: root/docs/type_system/empty.md
blob: 09869d6d26085c04c0eefddd58ebd841125d602d (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
# Empty

---

Container type can be null

```text
Empty[[] TYPE]
```

## Use with `Option` Union

```text
make_array : ([yes]
    ? yes {
        `some Array $ (1; 2; 3)
        `nome
    }
)
v : make_array(...) // Empty[Array[I64]] $ .none OR Empty[Array[I64]] $ (.some : (1; 2; 3))
# v {
    .some {[x] `log x } // Array[I64] $ (1; 2; 3)
    .none { ... }
}
// same as above
? v {[x] `log x } // Array[I64] $ (1; 2; 3)
```