Change let to let* in apply-generic

Not strictly necessary, but a bit neater maybe.
This commit is contained in:
Oliver Payne 2022-02-24 20:40:03 +00:00
parent 7f46244600
commit 13368fba13
1 changed files with 11 additions and 11 deletions

View File

@ -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