Steve Wampler <[EMAIL PROTECTED]> wrote: > >Here's another little puzzle that's fun do in Icon/Unicon. >(In this case, the solution I have is Icon-compliant): > >Write a program that reads strings from standard input >and outputs those strings with the letters rearranged in >alphabetical order. >
procedure order(s) local letter_counts, outs letter_counts := table(0) every letter_counts[!s] +:= 1 letter_counts := sort(letter_counts, 3) outs := "" while outs ||:= repl(get(letter_counts), get(letter_counts)) return outs end procedure main(cmdl) while write(order(read())) exit() end __________________________________________________________________ Introducing the New Netscape Internet Service. Only $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Unicon-group mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unicon-group
