/trunk/Examples/test-suite/schemerunme/overload_complicated.scm
Lisp | 16 lines | 10 code | 4 blank | 2 comment | 0 complexity | caf1f0bb46ff3bf8b7f3c91e5885ed04 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- (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)