nafc
delays evaluation somehow until the args to the goal became ground. Is there some generic support for this delaying? I looked at the implementation but, well, didn't really get a clue. Maybe cgoal
is the essence of it.
But in my actual use-case, I don't have a constraint but a relation (foo a b c)
which requires that at least a
and b
, or c
are ground. It would be nice if I could delay that until that is the case.
@tsdh: I think it’s in the IConstraintStep
reification:
IRunnable
(-runnable? [_]
(every? #(ground-term? % s) args))))
https://github.com/clojure/core.logic/blob/master/src/main/clojure/clojure/core/logic.clj#L2711
@jballanc: That's probably it. I'll tinker around with that if I find some time.
Thanks
np