Skip to content

Commit

Permalink
making error bindings optional in catcher
Browse files Browse the repository at this point in the history
  • Loading branch information
orthecreedence committed Jan 30, 2015
1 parent 2f4ffd9 commit b764b39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion promise.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@
(lambda (e)
(typecase e
,@(loop for x in handler-forms collect
(list (car x) `(let ((,(caadr x) e)) ,@(cddr x))))))))
(list (car x)
(let ((bind (caadr x)))
(if bind
`(let ((,(caadr x) e)) ,@(cddr x))
`(progn ,@(cddr x))))))))))

(defun do-tap (promise tap-fn)
"Gives a handler function access to a promise's value but finishes the
Expand Down

0 comments on commit b764b39

Please sign in to comment.