Welcome to the CHICKEN Scheme pasting service

digits->number added by siiky on Fri Apr 25 15:56:31 2025

(define (digits->number lst base)
  (if (null? lst)
      0
      (let loop ((ret (car lst))
                 (lst (cdr lst))
                 (coeff base))
        (if (null? lst)
            ret
            (loop (+ ret (* (car lst) coeff))
                  (cdr lst)
                  (* coeff base))))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which backend storage does qwiki use?
Visually impaired? Let me spell it for you (wav file) download WAV