Ordered words: Difference between revisions

Content added Content deleted
No edit summary
Line 2,416: Line 2,416:
glossy
glossy
knotty</pre>
knotty</pre>

=={{header|Maple}}==
<lang Maple>lst := StringTools:-Split(Import("http://www.puzzlers.org/pub/wordlists/unixdict.txt"), "\n"):
longest := 0:
words := Array():
i := 1:
for word in lst do
if StringTools:-IsSorted(word) then
len := StringTools:-Length(word):
if len > longest then
longest := len:
words := Array():
words(1) := word:
i := 2:
elif len = longest then
words(i) := word:
i++:
end if;
end if;
end do;
for word in words do print(word); end do;</lang>
{{Out|Output}}
<pre>"abbott"
"accent"
"accept"
"access"
"accost"
"almost"
"bellow"
"billow"
"biopsy"
"chilly"
"choosy"
"choppy"
"effort"
"floppy"
"glossy"
"knotty"</pre>