This is like a flexible version of C's #ifdef ...
An example from file statistics.pl ( library(statistics) )
If thread_statistics/3 is not currently defined, we assume we are in the single-threaded SWI-Prolog version and define our own thread_statistics/3
:- if(\+current_predicate(thread_statistics/3)).
thread_statistics(_Thread, Key, Value) :- % single threaded version
statistics(Key, Value).
:- endif.
