When are evaluable functions looked up?

As all the variable finding routines share the same core, this is now also sensitive to interrupts.

It might be feasible to do something smarter to find singletons or not singletons. For example, we could process a term.

  • If it is ground, we can skip it if we encounter it again
  • If it holds variables and we find it again, these variables are not singletons.

On the basis of that, my intuition tells me these routines can be implemented proportional to the physical size of the term rather than the size of a tree-walk. I leave that to some volunteer :slight_smile: They are defined in pl-prims.c.