6 lines
348 B
Text
6 lines
348 B
Text
fcn isLex(word){ word.reduce(fcn(p,c){ (p<=c) and c or T(Void.Stop,False) }) }
|
|
lwords:=File("dict.txt").readln(*).apply("strip").filter(isLex);
|
|
max:=lwords.reduce(fcn(n,w){ w.len()>n and w.len() or n },0);
|
|
lwords=lwords.filter(fcn(w,n){ w.len()==n },max);
|
|
println("Num words: %d, all size %d\n".fmt(lwords.len(),max));
|
|
words.pump(Console.println);
|