Skip to content

Commit 4cda3f9

Browse files
committed
Better?
1 parent a48bf9a commit 4cda3f9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/basilisp/core.lpy

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4101,13 +4101,13 @@
41014101
(let [bound-name (first binding)
41024102
iter (second binding)]
41034103
`(let [it# (. ~iter ~'__aiter__)]
4104-
(loop [is-running?# true]
4105-
(when is-running?#
4106-
(try
4107-
(let [~bound-name (await (. it# ~'__anext__))]
4108-
~@body)
4109-
(catch python/StopAsyncIteration _
4110-
(recur false))))))))
4104+
(loop [val# nil]
4105+
(try
4106+
(let [~bound-name (await (. it# ~'__anext__))
4107+
result# (do ~@body)]
4108+
(recur result#))
4109+
(catch python/StopAsyncIteration _
4110+
val#))))))
41114111

41124112
(defmacro awith
41134113
"Evaluate ``body`` within a ``try`` / ``except`` expression, binding the named

0 commit comments

Comments
 (0)