Prolog Code Snippets

02 July, 2011   

The predicate returns true if Y is the factorial of X

How to parse a token list into functors (structured terms) in Prolog. The book "Logic in Prolog" by Gibbins has some good example code See http://www.ddj.com/184404172, listing 9 for the little language