[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add seq-random-elt

From: Ted Zlatanov
Subject: Re: Add seq-random-elt
Date: Sat, 22 Oct 2016 08:42:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Fri, 21 Oct 2016 17:30:02 -0400 Stefan Monnier <address@hidden> wrote: 

>>> Hmm... do we really need that?  What's the benefit?
>> I think it's convenient.  Accessing random elements of sequences is not
>> uncommon.

SM>     (seq-elt L (random (seq-length L)))

SM> it pretty convenient to write and pretty clear as well, so the benefit
SM> seems slim.

I don't like to name variables twice. I've sometimes forgotten to change
the second place when I copy and paste, creating very annoying bugs.

I also think this would be helpful to beginners who may not intuit the
right approach so easily.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]