Closed jasonhemann closed 3 years ago
It looks to me like, knowing that what you have is a cons, you can specialize the code in these cases to the non-variable cons case, and avoid restructuring the list of clauses. Am I missing something?
https://github.com/namin/staged-miniKanren/blob/4b2dff8952dcdc351fab32751f29f093330291a8/staged-interp.scm#L592
Yes, I think you can do that. I just wanted to keep the logic the same. You only save one bit of the recursive call each time.
It looks to me like, knowing that what you have is a cons, you can specialize the code in these cases to the non-variable cons case, and avoid restructuring the list of clauses. Am I missing something?
https://github.com/namin/staged-miniKanren/blob/4b2dff8952dcdc351fab32751f29f093330291a8/staged-interp.scm#L592