Ordered words: Difference between revisions

m
→‎{{header|J}}: unixdict.txt uses unix format -- no carriage returns
m (→‎{{header|J}}: unixdict.txt uses unix format -- no carriage returns)
Line 2,430:
=={{header|J}}==
<lang j>NB. from http://wiki.puzzlers.org/pub/wordlists/unixdict.txt
oWords=: (#~ ] = /:~L:0) cutLF CR-.~fread 'unixdict.txt'
;:inv (#~ (= >./)@:(#@>)) oWords
abbott accent accept access accost almost bellow billow biopsy chilly choosy choppy effort floppy glossy knotty</lang>
Line 2,436:
Recap:
 
# read dictionary, discarding irrelevant carriage return characters (<code>CR-.~fread 'unixdict.txt'</code>)
# break into words, one per line (<code>cutLF</code>)
# find ordered words (<code>(#~ ] = /:~L:0)</code>)
6,962

edits