aboutsummaryrefslogtreecommitdiff
path: root/examples/working-compiler
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2016-09-26 21:46:48 +0200
committerDrahflow <drahflow@gmx.de>2016-09-26 21:46:48 +0200
commit57a252a774b782c93ca9d2c8529da9932695b407 (patch)
treeea116d4c44ad49ce64afed07eaf522857157adc3 /examples/working-compiler
parentfc75bd874972eebad490dfc2b35121a54f234c2f (diff)
Look, we can have non-recursive functions :P
Diffstat (limited to 'examples/working-compiler')
-rw-r--r--examples/working-compiler/run_once.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/working-compiler/run_once.test b/examples/working-compiler/run_once.test
new file mode 100644
index 0000000..6a399f9
--- /dev/null
+++ b/examples/working-compiler/run_once.test
@@ -0,0 +1,11 @@
+{ "}" | *
+ { ==f 0 ==running
+ { f } { * }" ; { =*f { running not { 1 =running f 0 =running } rep } } ;
+ } *
+}" "}!" defq
+
+{
+ 0 ==a
+ { /g_runninng dump a dump g }! /g deffst
+ 1 |g rep
+} *