[racket] on reversing a list by way of sort
Hi Eli
I tried to squeeze out a little more efficiency, hopefully not at the
expense of too much loss of clarity, but I'm not overly fussed which exact
version of Fisher-Yates is (hopefully ;-) adopted.
[Sorry for drawing you further in.]
My take on your 3 points:
1. Fisher-Yates is only a few lines, so although not a one-liner, it
seems reasonable to use it for the better space and time performance.
2. I agree that an inside-out version is more apt.
3. On my reading the final point is an issue if (random n) has problems
like modulo bias, but if that's the case surely it is (random n) that needs
fixing.
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140917/906aacbd/attachment.html>