Allow empty vector to be used as a generator.
Added test for empty vector input.
Merge pull request #229 from campanja/empty-vector-generators

Allow empty vector to be used as a generator.