Refactoring composite/let implementation to be DRYer