(define (random-sort l)
(sort l
(lambda (x y)
(equal? 0 (random 2)))))
Note to self: Randomize a list in Scheme
Using PLT Scheme, I wanted to randomize a list. Here is what I came up with:
Tags:
Note To Self,
Programming,
Scheme
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment