RosettaCodeData/Task/Sort-an-array-of-composite-structures/Oz/sort-an-array-of-composite-structures.oz
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

13 lines
338 B
Text

declare
People = [person(name:joe value:3)
person(name:bill value:4)
person(name:alice value:20)
person(name:harry value:3)]
SortedPeople = {Sort People
fun {$ P1 P2}
P1.name < P2.name
end
}
in
{ForAll SortedPeople Show}