diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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) |
