Is it possible to “schedule” a call to a goal for later, when a certain condition holds …
Suppose that during some processing, say, parsing, pieces of information become available for calling a goal – however, the full information for calling the goal is not completed, and the full information for calling the goal will only become available at the end of the parse.
One way I could do it is to create (say, via global variables) a queue or stack of callable goals with (partial?) parameters (i.e. a closure), that would be explicitly called at a later point in time.
I am curious if there are some “built-in” mechanisms that could be used instead.
A closure, btw, is not in particular necessary – the final piece of information could be an asserted as fact by the parse, and once its available, those “lazy” goals could be called to complete the processing.