Add new example showing off how branches work
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
13
examples/branch.not
Normal file
13
examples/branch.not
Normal 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)
|
||||||
Reference in New Issue
Block a user