You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can achieve this behavior at parser level. Instead of creating composite closures with references to real composed closures we can add a level of indirection there. Something that abides to the Closure interface but delegates process into the real one.
Simpler solution will be doing a lookup in the closure registry every time for the real one. It might be not that efficient though (assuming we exercise the process logic way more times than what we change rules).
A more efficient solution will be to provide such indirection bound to the real closure and have a way to backtrace them and change the binding every time a closure is replaced.
Right now you can freely overwrite a preexistent closure in rules-js by simply providing the overwrite flag
Then when you invoke it directly you will exercise the modified behavior
However it won't affect preexistent higher order closures which are composed with
"the-closure-that-changed"
.The text was updated successfully, but these errors were encountered: