HCoop
/
bpt
/
guile.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
* configure.in: Generate Makefile for ice-9/debugging.
[bpt/guile.git]
/
ice-9
/
debugging
/
example-fns.scm
1
(define-module (ice-9 debugging example-fns)
2
#:export (fact1 fact2 facti))
3
4
(define (fact1 n)
5
(if (= n 0)
6
1
7
(* n (fact1 (- n 1)))))
8
9
(define (facti n a)
10
(if (= n 0)
11
a
12
(facti (- n 1) (* a n))))
13
14
(define (fact2 n)
15
(facti n 1))
16
17
; Test: (fact2 3)