completed curry function and module pattern exercises