Add function expr parsing
* Introduce new `fn` keyword * Function example is added to examples/expr.not Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
# pow = (n, p) {
|
||||
# p == 0
|
||||
# ?? 1
|
||||
# !! n * pow(n, p - 1)
|
||||
# pow = fn (n, p) {
|
||||
# if p == 0 {
|
||||
# 1
|
||||
# } else {
|
||||
# n * pow(n, p - 1)
|
||||
# }
|
||||
# }
|
||||
|
||||
kilo = pow(2, 10)
|
||||
|
||||
Reference in New Issue
Block a user