# Is there a has\_type/2 for difference list?

**URL:** <https://swi-prolog.discourse.group/t/is-there-a-has-type-2-for-difference-list/2622>\
**Category:** Predicate\
**Tags:** difference-list, has\_type2\
**Created:** [July 9, 2020, 10:17pm UTC](https://swi-prolog.discourse.group/t/is-there-a-has-type-2-for-difference-list/2622 "2020-07-09T22:17:49Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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 10, 2020, 7:07pm UTC](https://swi-prolog.discourse.group/t/is-there-a-has-type-2-for-difference-list/2622/6 "2020-07-10T19:07:29Z")

</div>

> [@jan](#):
>
> I’m not seeing the point very clearly.

I see your point in the rest of the paragraph. The reason I was suggesting it was that I spent more than a year or two never fully understanding difference list and am only now starting to feel confident that I am understanding them. When learning it would have been helpful to see the test cases for the difference list and have the has\_type/2 for difference\_list as a safety net.

But if the has\_type/2 for difference list is in the production code then others might think that is the way to go when it is not as you note.

After this little exercise I realize how much I need to fix the [Wiki on difference list](https://swi-prolog.discourse.group/t/difference-list/959).

Thanks. 😀

---

_[View the full topic](https://swi-prolog.discourse.group/t/is-there-a-has-type-2-for-difference-list/2622)._
