Subject: Re: [SWIPL] prolog syntax

From: Broudo Nissim <[email-masked]>
Date: Tue, 28 Aug 2001 11:00:31 -0400 (EDT)

Kobi,

You can use help(predicate), for example help(last).  Also you can use
listing(predicate), e.g. listing(last).

Nissim

On Tue, 28 Aug 2001, Kobi wrote:

> Hi
> I was reading your manual and I wondered if you
> have or know where can I download from the syntax
> of the functions that are already in prolog.
> like last,append,reverse, etc.
> 
> last(X,X).
> last(X,[L|Z]):-last(X,Z).
> 
> where can I find something like that.
> not just what is does and what are the parameters.
> like you have on the help file: last(?Elem, ?List)
> I want to see how do you write each function in prolog.
> like that for instance:
> 
> append(B,B).
> append([X|A],B,[X|C]):-append(A,B,C).
> 
> If you could help me I'd appreciate that.
> thank you.
>