aboutsummaryrefslogtreecommitdiff
path: root/fib.kpl
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-08-30 09:36:50 -0400
committernodist <kevin.comas.git@gmail.com>2026-08-30 09:36:50 -0400
commit02acd9c30c85fc2f4e252b57660b74e990821b22 (patch)
tree7c555b925957441bfc341c8be3cc286e54c38d5f /fib.kpl
parente8434234f2dc7ef89477205aae05cabc4ac41d39 (diff)
export fib lambdas
Diffstat (limited to 'fib.kpl')
-rw-r--r--fib.kpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/fib.kpl b/fib.kpl
index 1ce17e6..224e834 100644
--- a/fib.kpl
+++ b/fib.kpl
@@ -1,7 +1,7 @@
// Fibonacci Example
-fib_recursive : `{[I64 n]
+`export fib_recursive : `{[I64 n]
? n < 0 { .error $ "n Cannot Be Negative" }
fib : `{[I64 n]
? {
@@ -13,7 +13,7 @@ fib_recursive : `{[I64 n]
fib `sync n
}
-fib_loop : `{[I64 n]
+`export fib_loop : `{[I64 n]
? n < 0 { `return.error $ "n Cannot Be Negative" }
a : 0
b : 1
@@ -25,7 +25,7 @@ fib_loop : `{[I64 n]
a
}
-fib_array : `{[I64 n]
+`export fib_array : `{[I64 n]
? {
n < 0 { `return.error $ "n Cannot Be Negative" }
n > 1 { n -: 1 }