One of the neat things about Prolog is that queries can be run both forwards and backwards, so I believe this article should already have you covered ;)
One of the neat things about Prolog is that queries can be run both forwards and backwards, so I believe this article should already have you covered ;)