Sunday, April 19, 2009

Var Substitution

When dealing with the variable substitution function in part 2 what is the format for the parameters. In the project write up it
(varsubst '(parent (? x) (mother-of (? y)))
'( ((? x) Fred) ((? y) Mary)))



But it seems that '(parent (? x) (mother-of (? y))) should be '((parent (? x) (mother-of(?y)))

What is the correct format?

3 comments:

  1. I guess part of my post go cut off

    It said that '(parent (? x) ....)))
    should be '((parent (? X)......)))

    ReplyDelete
  2. (varsubst '(parent (? x) (mother-of (? y)))
    '( ((? x) Fred) ((? y) Mary)))
    is correct.

    By the way, '((parent (? x) (mother-of(?y))) seems to have an open parentheses.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete

Note: Only a member of this blog may post a comment.