Corrected the generate function's return type
Merge pull request #245 from GrahamCampbell/doc

Return Type Fix