Day 3: Blowing Up Vegas

You should be getting a better understanding of why I picked the Rain Man, the autistic savant, for Prolog. Though it’s sometimes difficult to understand, it’s amazing to think of programming in this way. One of my favorite points in Rain Man was when Ray’s brother realized he could count cards. Raymond and his brother went to Vegas and just about broke the bank. In this section, you’re going to see a side of Prolog that will leave you smiling. Coding the examples in this chapter was equal parts maddening and exhilarating. We’re going to solve two famous puzzles that are right in Prolog’s comfort zone, solving systems with constraints.

You may want to take a shot at some of these puzzles yourself. If you do, try describing ...

Get Seven Languages in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.