Aggregate pattern: Difference between revisions

Content deleted Content added
This code is unrelated to the example
Line 9:
In [[Design Patterns]], an aggregate is not a design pattern but rather refers to an object such as a list, vector, or generator which provides an interface for creating [[iterator]]s. The following example code is in [[Python (programming language)|Python]].
<source lang="python">
mylist = ['apples','oranges','milk','eggs','flour']
 
for item in mylist:
print "Mom, we're out of " + item + "!"
 
def fibonacci(n):
a,b = 0,1