summaryrefslogtreecommitdiff
path: root/module/oop/goops/compile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/oop/goops/compile.scm')
-rw-r--r--module/oop/goops/compile.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/module/oop/goops/compile.scm b/module/oop/goops/compile.scm
index e6b13c416..732c1bccd 100644
--- a/module/oop/goops/compile.scm
+++ b/module/oop/goops/compile.scm
@@ -34,11 +34,12 @@
(define code-table-lookup
(letrec ((check-entry (lambda (entry types)
- (if (null? types)
- (and (not (struct? (car entry)))
- entry)
- (and (eq? (car entry) (car types))
- (check-entry (cdr entry) (cdr types)))))))
+ (cond
+ ((not (pair? entry)) (and (null? types) entry))
+ ((null? types) #f)
+ (else
+ (and (eq? (car entry) (car types))
+ (check-entry (cdr entry) (cdr types))))))))
(lambda (code-table types)
(cond ((null? code-table) #f)
((check-entry (car code-table) types))