6.2 Conversion of Prolog terms to Elisp objects
Sweep converts Prolog terms into Elisp object to allow efficient
processing of Prolog query results in Elisp (see Definition of sweeprolog-next-solution).
- Prolog strings are converted to equivalent Elisp strings.
- Prolog integers are converted to equivalent Elisp integers.
- Prolog floats are converted to equivalent Elisp floats.
- A Prolog atom
foo is converted to a cons cell
(atom . "foo").
- The Prolog empty list
 is converted to the Elisp
- Prolog lists are converted to Elisp cons cells whose
the representations of the head and the tail of the list.
- Prolog compounds are converted to list whose first element is the
compound. The second element is a string denoting the
functor name of the compound, and the rest of the elements are the
arguments of the compound in their Elisp representation.
- All other Prolog terms (variables, blobs and dicts) are currently
represented in Elisp only by their type:
- Prolog variables are converted to the symbol
- Prolog blobs are converted to the symbol
- Prolog dicts are converted to the symbol