kanren
kanren copied to clipboard
Consider using `WeakKeyDictionary`s as states
In relation to https://github.com/pythological/kanren/issues/55, using a WeakKeyDictionary might help automatically thin large states containing "auxiliary" logic variables that are no longer relevant.
We would definitely need to profile this and see how well it scales in certain "directions".
N.B. A lot of the state cloning is implicitly done within unify, so this might be more appropriate for https://github.com/pythological/unification.