Implementation of a module design pattern with a constructor and iterator.