tlist.h

# #include "tlist.h"

This page has information from files tlist.h and tlist.c.

## Contents

- Public Routines
- Public Definitions
- Introduction

## Public Routines in File tlist.c

#### Index

constants_in_term | tlist_remove | zap_tlist |
tlist_copy | tlist_union |  |

#### Details

    Ilist constants_in_term(Term t, Ilist p);

Given a term t, return a plist containing the set of constants in t.

    Plist tlist_copy(Plist p);

    Plist tlist_remove(Term t, Plist p);

Remove a term from a Plist. Term_ident() is used, and the term in the list is zapped.

    Plist tlist_union(Plist a, Plist b);

Return the union of two Plists of terms. If the inputs are sets, the output is a set. Do not refer the inputs after the call. Duplicates are zapped.

    void zap_tlist(Plist p);

Zap each term in the list and free the list. If you want to free the list only, without zapping the terms, use zap_plist(p) instead.

## Public Definitions in File tlist.h

## Introduction

This little package handles singly-linked lists of terms. The data type Plist is used to build the lists.

Note that there is another package, listterm, that does similar things, but constructing the lists from ordinary terms, as in Prolog.