summaryrefslogtreecommitdiff
path: root/tests/mime-detection/test.ss
blob: 8f60c7845e345d011ad01e1409b02f9481f0b0e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;; tested with Guile; might need
;; slight modification for your
;; Scheme dialect

(use-modules (ice-9 format))

(define (fac n)
  (let loop ((acc 1)
             (i   n))
    (if (zero? i)
        acc
        (loop (* acc i) (- i 1)))))

(format #t "(fac 5) = ~d\n" (fac 5))