# Quick basic list questions. Not a test just checking what I believe to be correct

**URL:** <https://swi-prolog.discourse.group/t/quick-basic-list-questions-not-a-test-just-checking-what-i-believe-to-be-correct/2621>\
**Category:** Data Structure\
**Tags:** list, difference-list\
**Created:** [July 9, 2020, 8:27pm UTC](https://swi-prolog.discourse.group/t/quick-basic-list-questions-not-a-test-just-checking-what-i-believe-to-be-correct/2621 "2020-07-09T20:27:29Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [July 11, 2020, 2:09pm UTC](https://swi-prolog.discourse.group/t/quick-basic-list-questions-not-a-test-just-checking-what-i-believe-to-be-correct/2621/12 "2020-07-11T14:09:17Z")

</div>

> [@Boris](#):
>
> And you are probably doing more complicated things, where you actually want to take a pair of variables and determine whether they form a difference list?

The goal of this current round of post related to difference list is to help convince @dtonhofer that accumulator passing uses difference list. It started with this [post](https://swi-prolog.discourse.group/t/calling-call-1-makes-dcg-nonfunctional/2616/14).

In so doing others will hopefully correct me if I am wrong somewhere, e.g. [has\_type/2 for difference list](https://swi-prolog.discourse.group/t/is-there-a-has-type-2-for-difference-list/2622/3) and [what is a difference list](https://swi-prolog.discourse.group/t/what-is-empty/2040/5), and help to ensure I am understanding difference list correctly.

When Jan W. has\_type/2 for difference list correctly worked with the difference list [unit tests](https://swi-prolog.discourse.group/t/is-there-a-has-type-2-for-difference-list/2622/2) I knew I had crossed a significant boundary.

Currently I am doing Visio diagrams with the pointer notation for closed list, open list, difference list and difference list used with accumulator passing. In so doing it makes me think about all of the details upon which I then learn something. If the diagrams work as expected I will post them here. They will be an SVG so that others can view them.

---

_[View the full topic](https://swi-prolog.discourse.group/t/quick-basic-list-questions-not-a-test-just-checking-what-i-believe-to-be-correct/2621)._
