[minor] Use _.initial to simplify generate