generic implementation of module 'generator' and testing
back to initial commit