• map instead of loop

    From B. Pym@Nobody447095@here-nor-there.org to comp.lang.lisp,comp.lang.scheme on Thu Jul 3 22:28:57 2025
    From Newsgroup: comp.lang.lisp

    Pascal Costanza wrote:

    Besides trying to figure out what's more idiomatic, it is also
    (more?) important to note that one of the two expressions traverse
    the list once while the other traverses it twice. Traversing a
    list more often than necessary leads to less efficient code, which
    may or may not matter.

    Apart from that, I tend to prefer LOOP:

    (loop for i in list
    collect (foo (bar i)))

    Gauche Scheme (using function composition)

    (map (.$ foo bar) List)
    --- Synchronet 3.21d-Linux NewsLink 1.2