-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
This project is great. I have been working on some examples and came across what I think may be an issue. I would like some feedback whether I'm wrong in my thinking...
I have the following Prolog code:
predecessor( one, zero ).
predecessor( two, one ).
plus( two, zero, two ).
plus( two, one, three ).
plus( two, two, four ).
times( X, zero, zero ).
times( X, Y, Z ) :- predecessor( Y, Y1 ), times( X, Y1, P ), plus( X, P, Z ).
I am issuing the query:
times( two, Y, Z )
I was expecting to get:
Y = [zero, one, two]
Z = [zero, two, four]
but only the first two answers appear.
Any ideas why?
Stefan
Metadata
Metadata
Assignees
Labels
No labels