/trunk/Examples/test-suite/schemerunme/overload_complicated.scm
# · Lisp · 16 lines · 10 code · 4 blank · 2 comment · 0 complexity · caf1f0bb46ff3bf8b7f3c91e5885ed04 MD5 · raw file
- (define-macro (check form)
- `(if (not ,form)
- (error "Check failed: " ',form)))
- (define (=~ a b)
- (< (abs (- a b)) 1e-8))
- ;; Check first method
- (check (=~ (foo 1 2 "bar" 4) 15))
- ;; Check second method
- (check (=~ (foo 1 2) 4811.4))
- (check (=~ (foo 1 2 3.2) 4797.2))
- (check (=~ (foo 1 2 3.2 #\Q) 4798.2))
- (exit 0)