f6ded7712e
This is the first commit I do entirely in VE. It's a habit I'm planning on taking as it helps a lot to find usability issues.
17 lines
333 B
Plaintext
17 lines
333 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 ) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|