summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4181108..c36cb56 100644
--- a/README.md
+++ b/README.md
@@ -154,6 +154,13 @@ union Data {
i: int;
f: float;
}
+
+#### Type Aliases
+Create a new name for an existing type.
+```zc
+alias ID = int;
+alias PointMap = Map<string, Point>;
+```
```
### 4. Functions & Lambdas
@@ -378,6 +385,12 @@ struct Box<T> {
fn identity<T>(val: T) -> T {
return val;
}
+
+// Multi-parameter Generics
+struct Pair<K, V> {
+ key: K;
+ value: V;
+}
```
### 11. Concurrency (Async/Await)