from __future__ import generators

from rdflib.const import FIRST, REST, NIL

from rdflib.util import first

class Core(object):

    def items(self, list):
        while list:
            item = first(self.objects(list, FIRST))
            if item:
                yield item
            list = first(self.objects(list, REST))
