Closed meditans closed 8 months ago
@JanWielemaker, here's the small tweak I was mentioning a couple days ago. Please tell me if I'm missing something!
count(N)
By duplicating count(N) you achieve a term copy. As we use this to dynamically change the chunking in Pengines next(NewChunkSize), this would no longer work. You could work around that by doing the unification in the body. I prefer the SSU rules :smile: So, delayed the unification of the list, which also makes the predicate steadfast (not that that is needed for a local helper if we know it does not matter).
In the current version of the code, the first rule (no_chunk) never matches, because
[Template]
is unified in the head. While it is possible to just write the head asand do the unification later, I think a better solution is not using SSU rules, since the two clauses can be always distinguished by their first argument (no_chunk vs count(N)).
This PR fixes this behavior and makes the recursive toplevel in pengines work as intended with
chunk=false
.