Add new example showing off how branches work

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-11-10 18:04:37 -08:00
parent 97d836a197
commit d7c08ed090

13
examples/branch.not Normal file
View File

@@ -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)