scsh-0.5/debug/fact.scm

9 lines
114 B
Scheme

; don't copyright this, silly shell script
(define (fact n)
(if (= n 0)
1
(* n (fact (- n 1)))))