def list(elements, ordered=False, startIndex=1):
    """ Create an RST List from a collection.

        :param elements: (list) a collection of strings, each an element of
                         the list
        :param ordered: (bool) set's list type between bulleted and enumerated
        :param startIndex: (int) if start index is 1 then an auto-enumerated
                           list is used ("#. element\\\n")

        >>> list(['foo', 'bar'])
        '- foo\\n- bar\\n'
        >>> list(['foo', 'bar'], ordered=True)
        '#. foo\\n#. bar\\n'
        >>> list(['foo', 'bar'], ordered=True, startIndex=3)
        '3. foo\\n4. bar\\n'

        startIndex has no effect if not ordered
        >>> list(['foo', 'bar'], ordered=False, startIndex=3)
        '- foo\\n- bar\\n'
    """
    retVal = ''
    index = startIndex
    for element in elements:
        if ordered and startIndex==1:
            retVal += '#. %s\n' % (element)
        elif ordered and startIndex>1:
            retVal += '%s. %s\n' % (index, element)
            index = index + 1
        else:
            retVal += '- %s\n' % element
    return retVal