RosettaCodeData/Task/Reverse-words-in-a-string/Forth/reverse-words-in-a-string.fth
2023-07-01 13:44:08 -04:00

14 lines
419 B
Forth

: not-empty? dup 0 > ;
: (reverse) parse-name not-empty? IF recurse THEN type space ;
: reverse (reverse) cr ;
reverse ---------- Ice and Fire ------------
reverse
reverse fire, in end will world the say Some
reverse ice. in say Some
reverse desire of tasted I've what From
reverse fire. favor who those with hold I
reverse
reverse ... elided paragraph last ...
reverse
reverse Frost Robert -----------------------