Decorator pattern vs List

Viewed 1472

While reading on Decorator pattern, came across something that needed to be clarified. In decorator pattern we just wrap a given object and used a chain of executions for calculation. But why can't we have a list of those objects and iterate through each. I mean without having the chain, can't we just use a list and simple iteration through each object ?

Thanks

3 Answers

Decorating action will be executed within Object. With a list, it is outside the object

Related