Re: the "loop" macro

Liste des GroupesRevenir à cl lisp 
Sujet : Re: the "loop" macro
De : Nobody447095 (at) *nospam* here-nor-there.org (B. Pym)
Groupes : comp.lang.lisp
Date : 23. Jun 2025, 09:45:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <103b46b$1560o$1@dont-email.me>
User-Agent : XanaNews/1.18.1.6
M. Pitman wrote:

 (loop with best-foo = nil   ;untested
       for foo in (list foo1 foo2)
       when (or (not best-foo)
                (> (weight foo) (weight best-foo)))
         do (setq best-foo foo)
       finally (return best-foo))

Gauche Scheme:

(use gauche.collection :only (find-max))

(find-max '((a 2) (b 8) (c 5)) :key last)
 ===>
(b 8)

Date Sujet#  Auteur
23 Jun 25 * Re: the "loop" macro2B. Pym
30 Jun 25 `- Re: the "loop" macro1B. Pym

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal