From 08d3ca49897c85c71e7a66ce8902bbf04081c441 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Wed, 10 Jan 2024 11:08:48 -0800 Subject: fix dip --- examples/fib.stem | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/fib.stem (limited to 'examples/fib.stem') diff --git a/examples/fib.stem b/examples/fib.stem new file mode 100644 index 0000000..4104a36 --- /dev/null +++ b/examples/fib.stem @@ -0,0 +1,19 @@ +fib [ + dup 1 <= [ ] [ + dup 1 - fib + swap + dup 2 - fib + swap + dsc + + + ] if +] func + +main [ + dup 10 <= [ + dup fib . + 1 + main + ] [ exit ] if +] func + +0 main -- cgit