Closed MiSawa closed 3 years ago
Actually this might not be true...
def f: def g(x): ., x; g((. + 1) as $v | $v | if . > 2 then empty else f, $v end); f
calls a closure recursively (kinda), but the frame of f
are different for each recursion so it works.
I'm skeptical about the existence of a query that calls a closure recursively within the same frame.
Ah actually I did emit NewScope
on closures as well. So it should be fine even if there exists such query.
I think we can call a closure recursively through a function. So we'll probably need a scope for closures that require slots.