add main demo program.

This commit is contained in:
trans_soup 2023-10-31 17:44:06 +01:00
parent ef227ee6cf
commit ad1b763fd1

45
program.txt Normal file
View file

@ -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