Thien-Thi Nguyen writes: > I first heard of ‘iota’ in Scheme: > > (iota 8) => (0 1 2 3 4 5 6 7) > > which was inspired by APL (i believe): > > https://en.wikipedia.org/wiki/APL_(programming_language) > > 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... (defun ι (n) (loop for i from 0 to n collecting i)) At least that's what I've always seen. I guess you could to something like the following if you don't want to use LOOP: (defun ι (n) (let ((list '())) (do ((i 0 (1+ i))) ((= i n) t) (push i list)) (reverse list))) Sam -- Samuel W. Flint swflint@flintfam.org (402) 517-8468 freenode: swflint http://flintfam.org/~swflint 4096R/266596F4 (9477 D23E 389E 40C5 2F10 DE19 68E5 318E 2665 96F4) "The most dangerous phrase in the language is, 'We've always done it this way'." -- Grace Hopper