Reverse words in a string: Difference between revisions
Content deleted Content added
No edit summary |
|||
Line 3,081: | Line 3,081: | ||
----------------------- Robert Frost |
----------------------- Robert Frost |
||
</pre> |
</pre> |
||
=={{header|Tailspin}}== |
|||
<lang tailspin> |
|||
def input: ['---------- 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 -----------------------'] |
|||
composer words |
|||
[ <word>* ] |
|||
word: <~WS> <WS>? |
|||
end words |
|||
$input... -> '$($it -> words -> $it(-1..1:-1)...) |
|||
' -> stdout |
|||
</lang> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |