[Top][All Lists]

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

Re: Rationalising c[ad]\{2,5\}r.

From: Thien-Thi Nguyen
Subject: Re: Rationalising c[ad]\{2,5\}r.
Date: Thu, 12 Mar 2015 00:36:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

() Alan Mackenzie <address@hidden>
() Wed, 11 Mar 2015 23:00:54 +0000

   Thanks, I didn't know about `number-sequence'.  I'll start
   using it.  Just one thing, though, since `number-sequence' is
   also defined in subr.el, I'd have to wrap it in
   `eval-and-compile' to be able to use it in my macros.


   >  (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))))

   That's short enough that I might not really need the function

Less is more!

   `iota'?  A Greek letter, or a tiny amount.  I'm afraid you've
   lost me.  ;-)

I first heard of ‘iota’ in Scheme:

 (iota 8) => (0 1 2 3 4 5 6 7)

which was inspired by APL (i believe):


although the APL ‘iota’ (written "ι" (U+03b9)) produces
a 1-based sequence instead of 0-based.  I wonder what the
Common Lisp idiom for this functionality would be...

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

Attachment: signature.asc
Description: PGP signature

reply via email to

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