|
From: | Burton Samograd |
Subject: | Re: Randomly capitalise letters |
Date: | Fri, 23 Nov 2012 08:22:25 -0700 |
User-agent: | Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.2.50 (cygwin) |
Stefan Monnier <monnier@iro.umontreal.ca> writes: >> (while (not (= start end)) >> (if (= 0 (random downcase-factor)) >> (upcase-region start (1+ start))) >> (incf start)))) > > You could speed it up with something like > > (while (< start end) > (upcase-region start (1+ start)) > (incf start (+ 1 (random downcase-factor)))) Good idea in case you want to random-case 'War and Peace' :) -- Burton Samograd
[Prev in Thread] | Current Thread | [Next in Thread] |