Subject: Re: Constructing terms for an external module

From: Luis Iraola Moreno <[email-masked]>
Date: Wed, 03 Nov 1999 12:47:14 +0000 (WET)

On Wed, 3 Nov 1999, Jose Luis Fernandez Perez wrote:

> I need to construct a term to be called. Te term is in an external
> module, then i need to refer it
> using the functor ":".
>     module:predicate
>     For example, the term has arity 2,. I want to call
>         module:predicate(X,Y)
>     but constructing it.
>     I was trying it with
>         atom_to_term('module:predicate',L,_),Term =.. [L,X,Y].
>     to create
>     Term =  example:predicate(X,Y).
> But it does not succed, How can I construct predicates for an external
> module?

You just create the complex term, e.g. in the module 'lists' has the
predicate 'segment' and the predicate is not exported by the module, then
just call:

	lists:segment(...)

whenever you need it.