Reverse words in a string: Difference between revisions

Content added Content deleted
m (J: introduce some whitespace to help J novices with word recognition)
Line 1,075: Line 1,075:
</lang>
</lang>


The verb phrase <code>([:;@|.[:<;.1 ' ',])</code> reverses words in a string. The rest of the implementation has to do with defining the block of text we are working on, and applying this verb phrase to each line of that text.
The verb phrase <code>( [: ; @ |. [: < ;. 1 ' ' , ])</code> reverses words in a string. The rest of the implementation has to do with defining the block of text we are working on, and applying this verb phrase to each line of that text.


=={{header|Java}}==
=={{header|Java}}==