Reverse words in a string: Difference between revisions

no edit summary
(Added Quackery.)
No edit summary
Line 339:
 
=={{header|Arturo}}==
<lang rebol>text: {
 
<lang arturo>text: "---------- Ice and Fire ------------
 
fire, in end will world the say Some
ice. in say Some
desire of tasted I've what From
fire. favor who those with hold I
 
... elided paragraph last ...
Frost Robert -----------------------"}
 
reversed: map split.lines text =>
Frost Robert -----------------------"
[join.with:" " reverse split.words &]
 
print [join a .with:"\n"] reversed</lang>
a: map [lines text] -> join [reverse|split & "/\s+/"] " "
print [join a "\n"]</lang>
 
{{out}}
1,532

edits