I want to do a sort of a list with oz language: But I can not understand This is my simple idea but it is not correct can you help me please
declare
fun {Permute L }
if L==nil then nil
else L.2.1|L.1|L.2.2
end
end
fun {Trie L }
if L==nil then nil
elseif L.1 < L.2.1 then L
else {Permute L}
end
{Trie L.2 }
end
{Browse {Trie [3 4 2 1 5 ]}}