Add examples for generator.

Fixes #10.