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

14 lines
651 B
Forth

: revWords(s)
s words reverse unwords ;
: reverseWords
"---------- Ice and Fire ------------" revWords println
" " revWords println
"fire, in end will world the say Some" revWords println
"ice. in say Some " revWords println
"desire of tasted I've what From " revWords println
"fire. favor who those with hold I " revWords println
" " revWords println
"... elided paragraph last ... " revWords println
" " revWords println
"Frost Robert -----------------------" revWords println ;