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

.. rst-class:: right

**object**

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

Difference list predicates.

| **Author:** Paulo Moura
| **Version:** 1.19
| **Date:** 2019/10/9

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


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

| **Remarks:**
|    (none)

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. 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``
^^^^^^^^^^^^^

Returns a list with the elements of the difference list.

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

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


------------

Protected predicates
--------------------

(see entity ancestors)

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

(see entity ancestors)

Operators
---------

(none)

.. seealso::

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

