summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-01-15 21:31:54 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-01-15 21:31:54 +0400
commitdce27619ac63bdf2c1b0a1b9cc7f990907ceb7a8 (patch)
tree216ed02622f7a52d45f4101289939d7b2b310200
parentdfedc2806bae8bed88008b0edb78713b7415ae7a (diff)
examples updated to new syntax
-rw-r--r--examples/fib.ash18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/fib.ash b/examples/fib.ash
index bf2b90d..c29476d 100644
--- a/examples/fib.ash
+++ b/examples/fib.ash
@@ -1,14 +1,14 @@
# Print out given number of elements in the Fibonacci sequence, 46 is the max value
define fib
- var lim push lim
- var a 1 push a
- var b 1 push b
- pull lim while dup 0 > do
- pull a dump
- pull b dup
- pull a
- + push b
- push a
+ var lim !lim
+ var a 1 !a
+ var b 1 !b
+ @lim while dup 0 > do
+ @a dump
+ @b dup
+ @a
+ + !b
+ !a
1 -
done
end