Prolog Language Difference Lists

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Difference Lists in Prolog denotes the concept to know the structure of a list up to a point. The remaining of the list can be left unbound until the complete evaluation of a predicate. A list where its end is unknown is referred as an open list, ended by a hole. This technique is especially useful to validate complex syntaxes or grammars.

The well-known Definite Clause Grammars (DCG) is using Difference Lists to operate under the hood.



Got any Prolog Language Question?