rdf: create an rdf::graph::foreach function for iterating over RDF list items