Add example for type annotations to readme

main
trivernis 2 months ago
parent d3e9feaaf4
commit 550d3c658c
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -71,6 +71,16 @@ let complex_addition a b c = {
let e = b + c
d + e + 1
}
// type annotations
let a: Num = 1
// functions
let add3 a: Num -> Num = a + 3
// multi arg
let add_all a b c: Num -> Num -> Num -> Num =
a + b + c
```
### Complex types

Loading…
Cancel
Save