From dc1ef25f1a7f8e36e93928e5b0288e203833e14a Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 18 Feb 2022 09:39:53 +0200 Subject: Clean up --- samples/loop.slam | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 samples/loop.slam (limited to 'samples/loop.slam') diff --git a/samples/loop.slam b/samples/loop.slam new file mode 100644 index 0000000..dce412e --- /dev/null +++ b/samples/loop.slam @@ -0,0 +1,9 @@ +define , dup . ; + +-- load idx value and print it (w/o consume) +-- calc idx - 1 and store in idx +10 $idx ! +[ $idx @ 0 gt? ] [ + $idx @ , + 1 - $idx ! +] loop -- cgit v1.3