[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add seq-random-elt
From: |
Stefan Monnier |
Subject: |
Re: Add seq-random-elt |
Date: |
Fri, 21 Oct 2016 14:57:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
> +(cl-defgeneric seq-random-elt (sequence)
> + "Return a random element from SEQUENCE."
> + (seq-elt sequence (random (seq-length sequence))))
Hmm... do we really need that? What's the benefit?
I have a hard time imagining that it's so commonly needed that it
deserves to be in seq.el to avoid everyone redefining its own.
Is there maybe a sequence which will provide another implementation?
If not, I'd vote to keep this out of seq.el.
Stefan