Date: | Mon Feb 9 11:35:11 1998 | |
Subject: | Re: Sorting a list of lists. | |
From: | David S Young | |
Volume-ID: | 980209.02 |
On Mon, 9 Feb 1998, John Williams wrote: > If this means "sort a list of lists by the sum of the numbers in each > sublist", you could do: > > define sum(list); > if list == [] then 0 else applist(dest(list), nonop +) endif > enddefine; Actually this definition of sum is more complex than it needs to be. You can just define it as define sum(list); applist(0, list, nonop +) enddefine; David Young |