我想了解这段代码对于带有 list 列表的 maplist 的自定义谓词可能是什么错误:
generateProjection(TableOrTables/Selectors, Row, Result) :-
writeln(kiki),
writeln(TableOrTables),
writeln(Selectors),
writeln(Row),
Result = 1/2.
compute_projection(Rows, TableOrTables, Selectors, Result) :-
writeln(hello),
writeln(Rows),
writeln(Selectors),
maplist(
generateProjection(TableOrTables/Selectors),
Rows,
Result
).
此查询有效:
generateProjection(foo/[foo/bar, foo/baz], [1, 2], Z).
而这个失败了:
compute_projection([[1, 2], [3, 4]], foo, [foo/bar, foo/baz], _4552/_4554).
谢谢你的帮助