Implement till 4.38
This commit is contained in:
11
util.scm
11
util.scm
@@ -7,6 +7,17 @@
|
||||
(display b)))
|
||||
(newline))
|
||||
|
||||
; I have this here to avoid name-conflicts with the amb implementation in
|
||||
; amb.scm.
|
||||
(define (my-assert a b)
|
||||
(cond ((equal? a b) (display "[ok]"))
|
||||
(else
|
||||
(display "[error] ")
|
||||
(display a)
|
||||
(display " != ")
|
||||
(display b)))
|
||||
(newline))
|
||||
|
||||
(define (gcd a b)
|
||||
(if (= b 0) (abs a) (gcd b (remainder a b))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user