[REBOL] sort/compare
From: pguimond:wanadoo at: 6-Nov-2002 21:58
Hi
I try to sort a series of blocks on the second element of the block which represents
the age of individuals.
rebol []
person: make block! [ name age ]
damien: make person [ "Damien" 20 ]
fabien: make person [ "Fabien" 1 ]
list-of-person: [ Damien Fabien ]
age-comp: func [ a b ] [ (second a) < (second b) ]
sort/compare list-of-person :age-comp
Script Error: second expected series argument of type: series pair event money date object
port time tuple any-function
struct event
** Where: halt-view
** Near: probe second a
The comparator function works though!
>> age-comp Damien Fabien
== false
How can I sort my series on the age ?
thanks for help!
Philippe