[minor] Use _.initial to simplify generate
Merge pull request #2405 from megawac/initial-gen

[minor] Use _.initial to simplify generate