scsh-0.6/scheme/debug/fact.scm

10 lines
195 B
Scheme
Raw Normal View History

2003-05-01 06:21:33 -04:00
; Copyright (c) 1993-1999 by Richard Kelsey and Jonathan Rees. See file COPYING.
; don't copyright this, silly shell script
(define (fact n)
(if (= n 0)
1
(* n (fact (- n 1)))))