feat: named fn* — (fn* name [args] ...) binds name to self for recursion (unblocks named-recur; jank conformance 110->119)
This commit is contained in:
parent
00a5dcacde
commit
305868fd88
1 changed files with 2 additions and 1 deletions
|
|
@ -745,6 +745,7 @@
|
|||
(when rest-pat
|
||||
(destructure-bind ctx fn-bindings rest-pat (tuple/slice fn-args i)))
|
||||
(put fn-bindings :jolt/loop-fn self)
|
||||
(when fn-name (bind-put fn-bindings fn-name self))
|
||||
# Use defining namespace for symbol resolution
|
||||
(def saved-ns (ctx-current-ns ctx))
|
||||
(ctx-set-current-ns ctx defining-ns)
|
||||
|
|
@ -753,7 +754,7 @@
|
|||
(set result (eval-form ctx fn-bindings body-form)))
|
||||
(ctx-set-current-ns ctx saved-ns)
|
||||
result))
|
||||
self))
|
||||
self)))
|
||||
"let*" (let [bind-vec (in form 1)
|
||||
body (tuple/slice form 2)]
|
||||
(var new-bindings @{})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue