Basic usage of generator.