Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!library.ucla.edu!ihnp4.ucsd.edu!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!jws
From: jws@munta.cs.mu.OZ.AU (Jeff Schultz)
Subject: Re: Avoiding use of univ operator
Message-ID: <9425111.17315@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
References: <34irt9$lk1@gnu.mat.uc.pt>
Date: Thu, 8 Sep 1994 01:07:40 GMT
Lines: 32


Paulo Moura <pmoura@alma.uc.pt> writes:

>Is there any public domain, freeware or shareware Prolog
>that accepts clauses like:

>       functor( Predicate, Argument ) :-
>               Predicate( Argument).

>I'am aware that LPA products supports this syntax,
>avoiding the use of the univ operator.

This syntax has been around for quite a while.  I think that some
versions of C-prolog supported it, but it's not really popular.
Richard O'Keefe's parser (that's used in quite a few Prologs) has the
comment,

	"I have added the rule X(...) -> apply(X,[...]) for Alan Mycroft."

but the facility is usually disabled.  If you have a Prolog using it it
might not be all that hard to enable it.

A similar extension is the call/N, N > 1 family.  Your example would be

	functor(Predicate, Argument) :-
		call(Predicate, Argument).

This is in NU-Prolog and in a Quintus library (I think), but it's not
all that popular either.


	Jeff Schultz
