public

This module directive makes all predicates that follow it public, a public predicate can be accessed by goals from other files. This version of public can only be used inside a module and it is executed after a module has been loaded and compiled.

see also: check_singleton/1 discontiguous/1 dynamic/1 dynamic/2 ensure_loaded/1 import/1 import/2 import_module/1 import_module/2 include/1 initialization/1 multifile/1 not_redo/1 private/0 private/1 public/1

Examples
public.

member( X, [ X|_ ] ).
member( X, [ Y|Tail ] ) :-
   member( X, Tail ).
the predicate member/2 is made a public predicate

 

 

info@trinc-prolog.com