[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: random predicate function
From: |
Tyler Smith |
Subject: |
Re: random predicate function |
Date: |
Mon, 13 Dec 2010 11:08:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Gary <help-gnu-emacs@garydjones.name> writes:
> Tyler Smith wrote:
>
>> (lambda (tmp1 tmp2) (if (eq (mod (random) 2) 0)
>> t
>> nil))))))
>
> I'm by no means an expert, but you should perhaps first once call
> (random t)
> Have a look at
> http://www.gnu.org/software/emacs/elisp/html_node/Random-Numbers.html
Thanks, Gary. I found that after I sent the first message. I've added in
a call to (random t). I still get some 'non-random' looking sorts. It's
hard to be sure, I'll have to run some sort of systematic check to see
if the results are consistent over large numbers of calls.
Cheers,
Tyler