From 550d3c658c5d18de3afd572e0cc695d0559e4f91 Mon Sep 17 00:00:00 2001 From: trivernis Date: Mon, 22 Jul 2024 23:15:44 +0200 Subject: [PATCH] Add example for type annotations to readme --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index fcaf42c..8354445 100644 --- a/README.md +++ b/README.md @@ -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