内容 4.4 Logic Programming · 386
练习 自检推理
Exercise 4.68: Define rules to implement the
reverse operation of Exercise 2.18, which returns a list
containing the same elements as a given list in reverse order. (Hint: Use
append-to-form.) Can your rules answer both (reverse (1 2 3) ?x)
and (reverse ?x (1 2 3))?
练习 4.68:定义规则以实现练习 2.18 中的 reverse 操作,该操作返回一个包含给定表中所有元素但顺序相反的表。(提示:使用 append-to-form。)你的规则能否同时回答 (reverse (1 2 3) ?x) 和 (reverse ?x (1 2 3)) 这两类查询?
我的笔记 自动保存