• Re: newbie asks: why CL rather than scheme?

    From B. Pym@Nobody447095@here-nor-there.org to comp.lang.lisp on Mon Jun 23 13:10:25 2025
    From Newsgroup: comp.lang.lisp

    K. M. Pitman wrote:

    but instead of the LOOP version above you would probably write:

    (define (add-up number-list)
    (let continue ((remaining-items number-list) (sum-so-far 0))
    (if (null? remaining-items)
    sum-so-far
    (add-up (cdr remaining-items)
    (+ sum-so-far (car remaining-items))))))

    Wrong. You didn't even use "continue". Understand?

    Gauche Scheme

    (do ((sum 0 (+ sum (pop! nums))))
    ((null? nums) sum))

    Another way.

    (use srfi-42 :only (sum-ec))

    (define (add-up number-list)
    (sum-ec (:list x number-list) x))
    --- Synchronet 3.21d-Linux NewsLink 1.2