RDF Lists in Turtle

In section 5.3 of the latest Turtle editors draft [1] I read

[[
Beginning the collection production records the curSubject and curPredicate, sets curSubject to a novel blank node Bhead and sets curSubject and curPredicate to Bhead and rdf:first respectively. Each object O in collection allocates a novel blank node Bn, creates an additional triple curSubject rdf:rest Bn . and sets curSubject to Bn. Finishing the collection production creates an additional triple curSubject rdf:rest rdf:nil . and restores curSubject and curPredicate The node produced by matchingcollection is the blank node Bhead.
]] 

Is this correct? In most programming languages one thinks of Nil as itself a list (just the empty one).
So one thinks that 

  :tasks todo () .

as equivalent to 

  :tasks todo rdf:nil .

Things are a bit odd, as otherwise it is not clear what the rdf:first of () is .
This seems wrong:

  :tasks todo _:t1 .
  :t1 rdf:first ? .
  :t2 rdf:next rdf:nil .

I see that this is tricky to describe correctly. Lists are usually described recursively.

Henry


[1] http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/index.html#sec-parsing-triples

Social Web Architect
http://bblfish.net/

Received on Sunday, 26 February 2012 09:43:55 UTC