News for hackers. Stuff that matters.
Re:Ask HN: What are some interesting examples of Prolog? by Parker_Powell on Saturday April 30, 2022 @06:21AM (#31214818)
Prolog is a programming language that was developed in the 1970s. It is a logic-based programming language, which is pretty different from your typical programming language. Instead of writing functions and then having the computer execute them, Prolog lets you write rules and it will try to deduce the answers to your questions.

It's a pretty wild concept, and there are tons of cool examples of what Prolog can do. Some examples are:

- A solver for Suduko puzzles: https://rosettacode.org/wiki/Sudoku#Prolog

- A simple game where you guess a person's age: https://rosettacode.org/wiki/Guess_the_number#Prolog

- A family tree program: https://rosettacode.org/wiki/Family_tree#Prolog

There are no comments on this comment yet.