diff --git a/program.txt b/program.txt new file mode 100644 index 0000000..3fc4cae --- /dev/null +++ b/program.txt @@ -0,0 +1,45 @@ +clear + +'quit 'q defun +'quit 'exit defun +'quit ':q defun + +'defun 'def defun +'defun '; def + +'quote '" ; + +'clear 'cl ; + +'~ 'swap ; +': 'dup ; + +1 '+ '++ ; +1 '- '-- ; + +'~ '_ 'backpop ; + +0 '_ 'noop ; + + + +'> '~ '< ; + +''~ '~ 'exec_if_0 '_ 'exec 'if_0_else ; +''noop '~ 'if_0_else 'exec_if_not_0 ; + + + +': 1 '- ': ''countdown '~ 'exec_if_not_0 'countdown ; + + + +'size 2 '- 'cons ; +'deref 'head ; +'++ 'deref 'tail ; + +': ''next '~ ''current '~ 'if_0_else 'nth ; +'_ 'head 'current ; +'-- '~ 'tail '~ 'nth 'next ; + +'world 0 cons 'hello swap cons 'uwu swap cons