.. index:: difflist
.. _difflist/0:

**object**

``difflist``
============

Difference list predicates.

| **Author:** Paulo Moura
| **Version:** 1.17
| **Date:** 2019/3/15

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Implements:**
|    ``public`` :ref:`listp <listp/0>`
| **Extends:**
|    ``public`` :ref:`compound <compound/0>`

Public interface
----------------

.. raw:: html

   <div id="add/3"> </div>

.. index:: add/3
.. _difflist/0::add/3:

``add/3``
^^^^^^^^^

Adds a term to the end of a difference list.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``add(Term,DiffList,NewDiffList)``
| **Mode and number of proofs:**
|    ``add(@term,+difference_list,-difference_list)`` - ``one``


.. raw:: html

   <div id="as_list/2"> </div>

.. index:: as_list/2
.. _difflist/0::as_list/2:

``as_list/2``
^^^^^^^^^^^^^

Converts a difference list to a normal list.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``as_list(DiffList,List)``
| **Mode and number of proofs:**
|    ``as_list(+difference_list,-list)`` - ``one``


Protected interface
-------------------

(see related entities)

Private predicates
------------------

(see related entities)

Operators
---------

(none)

Remarks
-------

(none)

.. seealso::

   :ref:`list <list/0>`, :ref:`list(Type) <list/1>`, :ref:`numberlist <numberlist/0>`, :ref:`varlist <varlist/0>`

