Difference List

How to: Difference List

Note: This is a work in progress. When it is complete these notes will be removed.

Note: Do not reply to this topic. Questions, concerns, comments, etc. are to handled in
Wiki Discussion: Wiki: How to - Difference List

Note: This is just to get the topic started and hopefully others to jump in and make this useful. Even if you are brand new to Prolog, this is such a basic and fundamental concept that you can and should join in to help improve the value of this Wiki. Join the discussion at Wiki Discussion: Wiki: How to - gtrace

Note: This is a wiki and if you have Trust level: Basic you can edit this by clicking on the pencil icon in the lower right. Capture
These topics also have history so they can be rolled-back if needed.

References:

“The Craft of Prolog” by Richard A. O`Keefe (WorldCat) Section 1.5 - Difference Lists

Difference lists in Prolog by Attila Csenki
Difference Lists by Frank Pfenning
Open Lists and Difference Lists by Paul Brna
Efficiency of Difference-List Programming by Ulrich Geske and Hans-Joachim Goltz

Learn Prolog Now! Chapter 7 Definite Clause Grammars by Patrick Blackburn, Johan Bos and Kristina Striegnitz
Common version
Testing version - using SWISH
Early version

Amzi - Difference List
Wikipedia DCG
WikiBooks

Difference list in other programming languages

Mercury - DCG
F# - DList
Haskell - Difference list
OCaml - DList

Difference Lists Explored

1 Like