As a late entry, Steve Hunter submitted the following
(I've reformatted it slightly):
procedure main()
while write(letter_sort(read()))
end
procedure letter_sort(s_in) #SJH 2003-02-22
local s_out # cf Icon Newsletter#18 23 Apr
1985
s_out:= ""
s_in ? every find(c := !.cset(&subject)) & (s_out ||:= c)
return s_out
end
which comes in nice and fast!:
Case 1:
weaver% RunTests
------------------ steve_hunter -----------------------
1.31s user 0.26s system 99% cpu 1.571 total
Case 2 (dictionary order):
weaver% RunTests --infile=input2.txt --valid=valid3.txt
------------------ steve_hunter -----------------------
3.35s user 0.07s system 100% cpu 3.414 total
--
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group