Difference List

last modified: September 23, 2013

A DifferenceList is a way to express how a list differs from another list.

It is a concept quite common in languages with PatternMatching or Unification, such as PrologLanguage or OzLanguage.

For example, a list expressed as

Head = [a,b,c]
Tail = [c]

is equivalent to

difflist = [a,b]

since c is what you get subtracting tail from head.

Read http://homepages.inf.ed.ac.uk/pbrna/prologbook/node180.html for some explanation.


Loading...