Examples for generator functions