diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-01-29 18:46:09 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-01-29 18:46:09 +0200 |
| commit | 4d1a0eea5a433724764b4178d16fcb50d1c2b6bc (patch) | |
| tree | cfc6a75798a08c3dcf642f82b79dd3b049e932e3 /samples | |
| parent | d2c46077f56c3b0a8dd7c34924c3ccb80fed892b (diff) | |
Add rudimentary step debugger
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/list.sample | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/samples/list.sample b/samples/list.sample index 914522f..b3fc947 100644 --- a/samples/list.sample +++ b/samples/list.sample @@ -12,6 +12,13 @@ define append $append_val forget $append_phrase forget ; +define stack-empty? stack-size 0 eq? ; + +define .. + [ stack-empty? not ] + [ . ] loop + ; + [ 2 3 ] 1 prepend . [ 2 3 ] 4 append . -[ 1 2 3 ] pop . .
\ No newline at end of file +[ 1 2 3 ] pop ..
\ No newline at end of file |
