Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions

m
m (→‎{{header|Factor}}: Make more robust by handling possible trailing newline)
Line 24:
<lang factor>USING: io io.encodings.utf8 io.files sequences ;
 
"rodgers.txt" utf8 file-lines harvest <reversed> [ print ] each</lang>
{{out}}
<pre>
--- Will Rodgers
 
until you can find a rock."
saying 'Nice Doggy'
1,808

edits