.. index:: magic
.. _magic/0:

.. rst-class:: right

**object**

``magic``
=========

Object encapsulating magic methods.

| **Author:** Ulf Nilsson. Ported to Logtalk and augmented with stratified negation by Victor Lagerkvist.
| **Version:** 1.0
| **Date:** 2010/6/13

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


| **Uses:**
|    :ref:`list <list/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|    (none)

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

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

.. raw:: html

   <div id="magicise/4"> </div>

.. index:: magicise/4
.. _magic/0::magicise/4:

``magicise/4``
^^^^^^^^^^^^^^

Transform (Head :- Body) into a magic clause (NewHead :- NewBody).

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

| **Template:**
|    ``magicise(Head,Body,NewHead,NewBody)``
| **Mode and number of proofs:**
|    ``magicise(+term,+list,-term,-list)`` - ``zero_or_one``


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

.. raw:: html

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

.. index:: magic/2
.. _magic/0::magic/2:

``magic/2``
^^^^^^^^^^^

Prefix the predicate symbol of Old with magic_.

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

| **Template:**
|    ``magic(Old,New)``
| **Mode and number of proofs:**
|    ``magic(+callable,-callable)`` - ``zero_or_one``


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

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

(no local declarations; see entity ancestors if any)

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

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

