Closed Mercerenies closed 3 years ago
yield
is now a special form and funcrefs cannot be constructed from it. If you want the old behavior (for some reason), you can explicitly use a lambda
(lambda (x y) (yield x y))
but I'm not sure why you would want to do that anyway.
Currently, we wrap
yield
in a GDLisp function and use call magic to delegate to the actual built-in. But honestly, does it even make sense to treatyield
as a function? I mean, it explicitly depends on the call context, so converting it to a function sort of defeats the purpose. We can't eta abstract on it. Perhapsyield
should be a built-in keyword like it is in GDScript, because right now, the behavior of#'yield
is super bizarre.