Finish up branch implementation
* while and unconditional loops are now supported fully * break and continue keywords for loop control * List::thunkify() has been broken into its own structure so it can be broken out further as necessary Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
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!")
|
||||
}
|
||||
}
|
||||
num = 10
|
||||
|
||||
check(1)
|
||||
check(10)
|
||||
check(100)
|
||||
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!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user