Change let to let* in apply-generic
Not strictly necessary, but a bit neater maybe.
This commit is contained in:
parent
7f46244600
commit
13368fba13
22
2_78.rkt
22
2_78.rkt
|
@ -104,17 +104,17 @@
|
|||
(if (not (any-empty-list coerced-args))
|
||||
coerced-args
|
||||
(coerce-args args (cdr type-tags))))))
|
||||
(let ((type-tags (map type-tag args)))
|
||||
(let ((proc (get op type-tags)))
|
||||
(if proc
|
||||
(apply proc (map contents args))
|
||||
(if (> (length args) 1)
|
||||
(let ((coerced-args (coerce-args args type-tags)))
|
||||
(if (not (null? coerced-args))
|
||||
(apply apply-generic (cons op coerced-args))
|
||||
(error "Can't coerce arguments to a common type"
|
||||
(list op type-tags))))
|
||||
(error "Too few args"))))))
|
||||
(let* ((type-tags (map type-tag args))
|
||||
(proc (get op type-tags)))
|
||||
(if proc
|
||||
(apply proc (map contents args))
|
||||
(if (> (length args) 1)
|
||||
(let ((coerced-args (coerce-args args type-tags)))
|
||||
(if (not (null? coerced-args))
|
||||
(apply apply-generic (cons op coerced-args))
|
||||
(error "Can't coerce arguments to a common type"
|
||||
(list op type-tags))))
|
||||
(error "Too few args")))))
|
||||
|
||||
|
||||
;; Scheme numbers
|
||||
|
|
Loading…
Reference in New Issue