mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 02:48:07 +11:00
2d9a07d215
This was becoming heavy to manage.
9 lines
325 B
Plaintext
9 lines
325 B
Plaintext
: (parsed) ( a -- n f )
|
|
C@+ OVER C@ 0 ( a len firstchar startat )
|
|
SWAP '-' = IF 1+ THEN ( a len startat )
|
|
0 ROT ROT ( len ) ( startat ) DO ( a r )
|
|
OVER I + C@ ( a r c ) _pdacc ( a r f )
|
|
IF DROP 1- 0 UNLOOP EXIT THEN LOOP ( a r )
|
|
( negate if needed )
|
|
SWAP C@ '-' = IF 0 -^ THEN 1 ( r 1 ) ;
|