Ron Garret <rNOSPAMon@flownet.com> wrote:
+---------------
| rpw3@rpw3.org (Rob Warnock) wrote:
| > Ron Garret <rNOSPAMon@flownet.com> wrote:
| > +---------------
| > | (logior 1 (- (random 2)))
| > +---------------
| >
| > Shorter by one token [even more if you count the parens]:
| > (expt -1 (random 2))
|
| Damn! I knew there had to be a better way.
| I doff my hat to you, sir. :-)
+---------------
Sadly, I must decline the praise, since had I but taken the trouble
to look through the entire thread before responding I would have
seen that the very same version had been proposed by Paul Griffioen
more than an hour earlier! (Oh, the shame...) ;-}
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607