Re: CAR/CDR vs FIRST/REST

Liste des GroupesRevenir à cl lisp 
Sujet : Re: CAR/CDR vs FIRST/REST
De : Nobody447095 (at) *nospam* here-nor-there.org (B. Pym)
Groupes : comp.lang.lisp
Date : 12. Sep 2024, 19:59:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbva6t$c0o9$1@dont-email.me>
User-Agent : XanaNews/1.18.1.6
Barry Margolin wrote:

      (mapcan #'(lambda (x) (and (numberp x) (list x))) list)
 
      (loop for x in list
              when (numberp x) collect x)
 
I agree with this example.  Once I learned LOOP I never used the
above idiom again.


(filter number? '(a b c 1 2 3))
 ===>
(1 2 3)

Does using "loop" cripple the brain, or do only those
with crippled brains use "loop"?

Date Sujet#  Auteur
12 Sep 24 * Re: CAR/CDR vs FIRST/REST2B. Pym
13 Sep 24 `- Re: CAR/CDR vs FIRST/REST1Kaz Kylheku

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal