summaryrefslogtreecommitdiff
path: root/fib.kpl
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-05-19 12:30:40 -0400
committernodist <kevin.comas.git@gmail.com>2026-05-19 12:30:40 -0400
commita496efcd5d4660da359ce4702b5293698f115dda (patch)
treec07a9ba92f301c9c6854d9a2c271bb70412760bc /fib.kpl
parent0e12eb8f94783800247d20b4c29546d1941af020 (diff)
add ackerman example
Diffstat (limited to 'fib.kpl')
-rw-r--r--fib.kpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/fib.kpl b/fib.kpl
index 16edbb4..f049ba0 100644
--- a/fib.kpl
+++ b/fib.kpl
@@ -1,5 +1,8 @@
-// Fibonacci sequence for all numeric types
+/*
+ Fibonacci sequence
+ n can be any signed or unsigned integer type
+*/
`export fib : Fn[n] $ (
? {
@@ -9,7 +12,6 @@
}
)
-
`export fib_string Fn[n] $ (
String $ ("fib("; n; ") = "; fib `call_sync n; "\n")
)
@@ -22,5 +24,5 @@
"Usage: "; args `get 0; " "; args `get 1; " <number>\n"
)
}
- `print `call_sync fib_string `call_sync I64 $ args `get -1
+ `print fib_string `call_sync I64 $ args `get -1
)