Re: a bug in current_functor

Ulrich Neumerkel <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
The manual reads:

| current_functor(?Name, ?Arity)
| Successively unifies Name with the name and Arity with the
| arity of functors known to the system.

While accurate, the locution "known to the system" does not seem to
ring a bell to many.  It means: access to system internals, don't.

Is there any use to it?  Except for debugging purposes, if the number
of registered functors goes up for no reason?  But then a better place
would be some system module.

It cannot be for backwards compatibility, since in DECsystem 10
Prolog, the second argument used to be a structure.

current_functor(Name,Functor)
   Generates  (through backtracking) all currently known functors, and
   for each one returns its name and most general  term  as  Name  and
   Functor  respectively.  If  Name  is given, only functors with that
   name are generated.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.