Never mind, I found a short function that does the job...from the library:

File: %sort-nests.r
Author: "Jeff Kreis"

The function: sort/compare d func [a b][(pick a i) < pick b i]
Where I is the column you wish to sort on.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Alan Macleod
Sent: Sunday, January 29, 2006 12:50 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Sorting Blocks


How do you sort a block of blocks on an element other than the first?

For example:

db: [
        ["bob" "Smith" "12"]
        ["dan" "murphy" "25"]
        ["mike" "Coogan" "6"]
        ]

How do I sort by last name or by age

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to