Prolog-style unification?

Ype Kingma ykingma at accessforall.nl
Thu Jun 12 12:08:48 EDT 2003


Nielson Family wrote:

>
> Ype Kingma wrote:
>
>>>Calling Father this way could make it difficult to use it
>>>in multiple places in a single clause. An iterator per occurence
>>>seems just right, although I have to say that it
>>>is decades ago that I used Prolog...
>>>
> I'm not sure what you mean by this.  Could you elaborate?

Well, I overlooked this in the previous post:

 Grandfather = logic.Fact()

 Grandfather(Grandfather.Grandfather, Grandfather.Grandson) (
    Father(Grandfather.Grandfather, Grandfather.Son)
    Father(Grandfather.Son, Grandfather.Grandson))

Here an iterator per use of Father() seems just right
for backtracking over GrandFather().

Regards,
Ype






More information about the Python-list mailing list