Added doctest for ListFactory