Use default value to prevent raising an error

This commit is contained in:
Justin Ethier 2018-09-24 13:38:02 -04:00
parent 0882b90204
commit edf3c0e87f

View file

@ -738,8 +738,8 @@
; Core forms:
((ast:lambda? exp)
(let* ((id (ast:lambda-id exp))
(fnc (adb:get id)))
(if (adbf:simple fnc)
(fnc (adb:get/default id #f)))
(if (and fnc (adbf:simple fnc))
(opt:contract (caar (ast:lambda-body exp))) ;; Optimize-out the lambda
(ast:%make-lambda
(ast:lambda-id exp)