Last Updated: February 25, 2016
· szymonkor

Prolog interpreter in 160 lines of ES2015

I read an amazing book, "Seven languages in seven weeks" by Bruce A. Tate. One of the languages covered was Prolog. Here is a Prolog interpreter written in ES2015: https://curiosity-driven.org/prolog-interpreter

From wikipedia:
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.
Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of relations, represented as facts and rules. A computation is initiated by running a query over these relations.