[Cst-1b] Mistake in Prolog Notes?

Nic Infante ngli2@thor.cam.ac.uk
Wed, 17 May 2000 21:37:32 +0100 (BST)


I think it's not a proper list as the first term [a,b] is a list and
the second c (an atom since in lower case) is not. notation, the second
term . In the dot notation, (c,[]) would have to be a list of lists, which
it can't be.  [[a,b],C] could be a list since C is a variable and could be
instantiated to a list. Although I've just noticed that he's got
[[the,cat],sat] as an example of a list so I'm not sure.
Nic.

On Wed, 17 May 2000, Martin Harper wrote:

> I think he's trying to emphasise that it's the list [[a,b],c], NOT the list
> [a,b,c]... but certainly, such structures are lists.
> Martin.
> 
> "M.Y.W.Y.B." wrote:
> 
> > Prolog lecture notes, p18:
> >
> > The last example for lists written in dot notation is
> >
> > (.(a,.(b,[])),.(c,[]))
> >
> > The notes claim that this is not a proper list but to me it seems that it's
> > a list of two elements:
> > (1) .(a,.(b,[])) is the head of the list
> > (2) .(c,[]) is the tail of the list, ie a list of 1 element, c.
> >
> > Have I missed out something or is it a real mistake in the notes?
> >
> > Thanks
> >
> > Moritz
> >
> > _______________________________________________
> > CST-1B mailing list
> > CST-1B@srcf.ucam.org
> > http://www.srcf.ucam.org/mailman/listinfo/cst-1b
> 
> 
> 
> _______________________________________________
> CST-1B mailing list
> CST-1B@srcf.ucam.org
> http://www.srcf.ucam.org/mailman/listinfo/cst-1b
> 

Nic Infante
Fitzwilliam College / Computer Laboratory
University of Cambridge