Nested generator

this pull request looks good tristan

thanks other tristan