From d7c08ed09046d0b9b88de948b80781068ec996c1 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Tue, 10 Nov 2020 18:04:37 -0800 Subject: [PATCH] Add new example showing off how branches work Signed-off-by: Alek Ratzloff --- examples/branch.not | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/branch.not diff --git a/examples/branch.not b/examples/branch.not new file mode 100644 index 0000000..f08e65f --- /dev/null +++ b/examples/branch.not @@ -0,0 +1,13 @@ +check = fn(num) { + if num < 10 { + println("The number is pretty small.") + } elif num < 100 { + println("That number is getting pretty big.") + } el { + println("Whoa! That number is huge!") + } +} + +check(1) +check(10) +check(100)