7 Fév
2009
7 Fév
'09
10:03
in the following code: (define-macro (assert-equal lhs rhs) (let ((g-lhs (gensym)) (g-rhs (gensym))) `(let ((,g-lhs ,lhs) (,g-rhs ,rhs)) (if (not (equal? ,g-lhs ,g-rhs)) (raise (list ',lhs '= ,g-lhs '<> ,g-rhs '= ',rhs)))))) used like this: (assert-equal (+ 1 2) (- 3 4)) is there anyway to rewirte that last line: (raise (list ...)) somehow in the format of: (raise '(....))