Sounds like you're trying to implement a shuffling algorithm. Quickly adapted from a piece of code that I had lying around:
Is = {List.map {List.sort {List.map [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
fun {$ A} A#{OS.rand} end}
fun {$ A B} M N in A = _#N B = _#M N>M end}
fun {$ A} B in A = B#_ B end}
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
