() Alan Mackenzie () Wed, 11 Mar 2015 21:43:24 +0000 Comments? Bravo! (defun gen-cXXr--make-seq (bits) "Generate a list of all integers with BITS bits, in ascending order." (let ((x (lsh 1 bits)) acc) (while (> x 0) (setq x (1- x)) (push x acc)) acc)) You can save some lines by using ‘number-sequence’: (defun gen-cXXr--make-seq (bits) "Generate a list of all integers with BITS bits, in ascending order." (number-sequence 0 (1- (lsh 1 bits)))) I wonder (idly) if the number of ‘(number-sequence 0 (1- ...))’ in the codebase justifies adding ‘iota’. Hmmm. -- Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) => nil