Ordered words: Difference between revisions
m
→{{header|Sidef}}: minor code simplifications
m (→{{header|Sidef}}: minor code simplifications) |
|||
Line 3,210:
=={{header|Sidef}}==
<lang ruby>var words = [[]]
var file = %f'unixdict.txt'
file.open_r(\var fh, \var err) ->
|| die "Can't open file #{file}: $#{err}"
fh.each { |line|
line.trim!
if (line == line.sort)
words[line.length] := []
}
say words[-1].join(' ')
{{out}}
<pre>abbott accent accept access accost almost bellow billow biopsy chilly choosy choppy effort floppy glossy knotty</pre>
|