Closed bachdavi closed 5 years ago
I think we have to be even more careful. Assuming the current semantics of transform, which replace the input binding, rather than tacking on output bindings, consider
[(transform ?x) ?y]
[(satisfies? x)]
Clearly we have to implement the predicate first, because the predicate might not make sense for transformed values. Similarly
[(transform ?x) ?y]
[(satisfies? y)]
would have to be unified the other way round.
This leads me to believe that the in-place semantics are (as always) the problem, and we should move to transform meaning the following:
;; input tuples
[?x0 ?x1 ?x2 ...] [?x0 ?x1 ?x2 ...] [?x0 ?x1 ?x2 ...]
;; transform
[(transform ?x1) ?y1]
;; output tuples
[?x0 ?x1 ?x2 ... ?y1] [?x0 ?x1 ?x2 ... y1] [?x0 ?x1 ?x2 ... ?y1]
Quoting: At the very least,
result-sym
should be part of the bound symbols. But we also have to think about whether the ouput binding is supposed to replace the input binding, or whether they co-exist, etc...