Skip to content

Make closure replacement dynamic #10

@aitrusgit

Description

@aitrusgit

Right now you can freely overwrite a preexistent closure in rules-js by simply providing the overwrite flag

engine.add("closure-that-changes", definition, { overwrite: true });

Then when you invoke it directly you will exercise the modified behavior

engine.process("closure-that-change", fact);

However it won't affect preexistent higher order closures which are composed with "the-closure-that-changed".

engine.process("higher-order-closure", fact); // exercise old "closure-that-changes"!!! =(

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions