mirror of
https://gitlab.cs.washington.edu/fidelp/frustration.git
synced 2024-12-26 21:58:20 +01:00
10 lines
302 B
Forth
10 lines
302 B
Forth
|
: lit dup + 1 + , ;
|
||
|
: setup r> r> dup >r >r >r ;
|
||
|
: rdrop r> r> drop >r ;
|
||
|
: loop[ [ ' setup lit ] , [ ' rdrop lit ] , ; immediate
|
||
|
: ]loop latest @ 8 + , ; immediate
|
||
|
: ( loop[ 41 key = ? ret ]loop ; immediate
|
||
|
|
||
|
: done drop rdrop ret ;
|
||
|
: stars ( n -- ) loop[ dup 0= ? done 1 - 42 emit ]loop ;
|