Re: (iota N) in Spice Lisp idiom

Liste des GroupesRevenir à cl scheme 
Sujet : Re: (iota N) in Spice Lisp idiom
De : jbb (at) *nospam* notatt.com (Jeff Barnett)
Groupes : comp.lang.lisp comp.lang.scheme
Date : 27. May 2024, 00:11:13
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v30c26$3knbt$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 5/26/2024 2:32 AM, B. Pym wrote:
On 2/27/2024, Kaz Kylheku wrote:
 
Common Lisp's loop macro has a collect{ing} clause.
>
   (defun iota (n)
     (loop for i from i to n
           collect n))
  Incorrect; three errors.
 Correct:
 (defun iota (n)
   (loop for i from 0 below n
     collect i))
Either could be correct I think: It depends on the range desired and I can't determine that since the message history has been lost.
--
Jeff Barnett

Date Sujet#  Auteur
26 May 24 * Re: (iota N) in Spice Lisp idiom3B. Pym
26 May 24 +- Re: (iota N) in Spice Lisp idiom1Kaz Kylheku
27 May 24 `- Re: (iota N) in Spice Lisp idiom1Jeff Barnett

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal