37 lines
813 B
Text
37 lines
813 B
Text
: >string-index
|
|
"" split
|
|
"&'0123456789abcdefghijklmnopqrstuvwxyz" "" split
|
|
swap index collapse ;
|
|
: chars "" split length swap drop ;
|
|
: cr "\n" . ;
|
|
: nip swap drop ;
|
|
: ordered?
|
|
dup grade subscript != '+ reduce if 0 else -1 then ;
|
|
|
|
: filtering
|
|
[] '_ set
|
|
0 do read
|
|
2dup chars
|
|
<=
|
|
if dup >string-index ordered?
|
|
if 2dup chars
|
|
<
|
|
if nip dup chars swap
|
|
[] '_ set
|
|
then
|
|
_ swap append '_ set
|
|
'. . # progress dot
|
|
else drop
|
|
then
|
|
else drop
|
|
then
|
|
eof if break then loop
|
|
|
|
cr _ . cr
|
|
;
|
|
|
|
: ordered-words
|
|
'< 'unixdict.txt open 'fh set
|
|
fh fin filtering fh close ;
|
|
|
|
ordered-words
|