Ordered words: Difference between revisions
Added Arturo implementation
(add Standard ML) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 333:
{{output}}
<lang applescript>{"abbott", "accent", "accept", "access", "accost", "almost", "bellow", "billow", "biopsy", "chilly", "choosy", "choppy", "effort", "floppy", "glossy", "knotty"}</lang>
=={{header|Arturo}}==
<lang rebol>ordered?: function [w]->
w = join sort split w
words: read.lines relative "unixdict.txt"
ret: new []
loop words 'wrd [
if ordered? wrd ->
'ret ++ #[w: wrd l: size wrd]
]
sort.descending.by: 'l 'ret
maxl: get first ret 'l
print sort map select ret 'x -> maxl = x\l
'x -> x\w</lang>
{{out}}
<pre>abbott accent accept access accost almost bellow billow biopsy chilly choosy choppy effort floppy glossy knotty</pre>
=={{header|AutoHotkey}}==
|