Implemented the Hash::inject() method