Reverse words in a string: Difference between revisions
Content deleted Content added
→{{header|BQN}}: Array-oriented version |
imported>Arakov |
||
Line 1,168: | Line 1,168: | ||
=={{header|Elena}}== |
=={{header|Elena}}== |
||
ELENA |
ELENA 6.x: |
||
<syntaxhighlight lang="elena">import extensions; |
<syntaxhighlight lang="elena">import extensions; |
||
import system'routines; |
import system'routines; |
||
Line 1,185: | Line 1,185: | ||
"Frost Robert -----------------------"}; |
"Frost Robert -----------------------"}; |
||
text.forEach:(line) |
text.forEach::(line) |
||
{ |
{ |
||
line.splitBy |
line.splitBy(" ").sequenceReverse().forEach::(word) |
||
{ |
{ |
||
console.print(word," ") |
console.print(word," ") |