rdf('http://example.org/basket', 'http://example.org/stuff/1.0/':hasFruit, '__List1'). rdf(l1, rdf:type, rdf:'Statement'). rdf(l1, rdf:subject, 'http://example.org/basket'). rdf(l1, rdf:predicate, 'http://example.org/stuff/1.0/':hasFruit). rdf(l1, rdf:object, '__List1'). rdf('__List1', rdf:type, rdf:'List'). rdf('__List1', rdf:first, 'http://example.org/banana'). rdf('__List1', rdf:rest, '__List2'). rdf('__List2', rdf:type, rdf:'List'). rdf('__List2', rdf:first, 'http://example.org/apple'). rdf('__List2', rdf:rest, '__List3'). rdf('__List3', rdf:type, rdf:'List'). rdf('__List3', rdf:first, 'http://example.org/pear'). rdf('__List3', rdf:rest, rdf:nil).