Re: Art of Prolog Exercise problem
- From: Roland Illig <roland.illig@xxxxxx>
- Date: Mon, 10 Oct 2005 12:43:11 +0200
David W. wrote:
busy(Lecturer, Time) :- course(Course, time(Day, Start, Finish), Lecturer, place(Building, Room)),
lecturer(Lecturer, Course), teaches(Lecturer, Day), location(Course, Building), occupied(Room, Day, Time).
What you probably meant, is:
busy(Lecturer, Day, Time) :-
course(_, time(Day, Start, Finish), Lecturer, _),
Start =< Time, Time =< Finish.Opposed to busy/2, busy/3 depends on the Day _and_ the Time.
Roland .
- Follow-Ups:
- Re: Art of Prolog Exercise problem
- From: David W .
- Re: Art of Prolog Exercise problem
- References:
- Art of Prolog Exercise problem
- From: David W .
- Art of Prolog Exercise problem
- Prev by Date: Re: Art of Prolog Exercise problem
- Next by Date: Re: Challenging problem
- Previous by thread: Re: Art of Prolog Exercise problem
- Next by thread: Re: Art of Prolog Exercise problem
- Index(es):