Skip to content

Commit

Permalink
putting for's body in unwind protect
Browse files Browse the repository at this point in the history
  • Loading branch information
loskool committed Jul 14, 2020
1 parent cf43176 commit 8c4ddae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gtwiwtg.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,11 @@ A -- 4
`(let ((,var-exp (next ,gen-var))) ,@body))))
`(let ((,gen-var ,gen))
(assert (typep ,gen-var 'gtwiwtg::generator!))
(loop
:while (has-next-p ,gen-var)
:do
,expr-body)
(unwind-protect
(loop
:while (has-next-p ,gen-var)
:do
,expr-body))
(stop ,gen-var))))

(defmacro fold ((acc init-val) (var-exp gen) expr)
Expand Down

0 comments on commit 8c4ddae

Please sign in to comment.