Skip to content

Commit

Permalink
[new] Extend IIFE-wrap to Clj
Browse files Browse the repository at this point in the history
The perf hit is negligible, and we can always re-evaluate this choice again
later. In the meantime, let's err on the side of greatest compatibility.
  • Loading branch information
ptaoussanis committed Oct 29, 2024
1 parent f7a5663 commit d0ad99d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projects/main/src/taoensso/telemere/impl.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,9 @@
( ~'__run-result signal#)
true))))]

(if cljs?
`((fn [] ~final-form)) ; IIFE wrap for use in `go` and other IOC-style bodies
(if-let [iife-wrap? true #_cljs?]
;; Small perf hit to improve compatibility within `go` and other IOC-style bodies
`((fn [] ~final-form))
(do final-form)))))))

(comment
Expand Down

0 comments on commit d0ad99d

Please sign in to comment.