mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
move ice-9/ and oop/ under module/
Moved ice-9/ and oop/ under module/, with the idea being that we have only scheme under module/. Adjusted configure.in and Makefile.am appropriately. Put oop/ at the end of the compilation order.
This commit is contained in:
parent
5192c9e89b
commit
00d0489205
95 changed files with 8 additions and 8 deletions
17
module/ice-9/debugging/example-fns.scm
Normal file
17
module/ice-9/debugging/example-fns.scm
Normal file
|
@ -0,0 +1,17 @@
|
|||
(define-module (ice-9 debugging example-fns)
|
||||
#:export (fact1 fact2 facti))
|
||||
|
||||
(define (fact1 n)
|
||||
(if (= n 0)
|
||||
1
|
||||
(* n (fact1 (- n 1)))))
|
||||
|
||||
(define (facti n a)
|
||||
(if (= n 0)
|
||||
a
|
||||
(facti (- n 1) (* a n))))
|
||||
|
||||
(define (fact2 n)
|
||||
(facti n 1))
|
||||
|
||||
; Test: (fact2 3)
|
Loading…
Add table
Add a link
Reference in a new issue