mirror of
https://github.com/crazybber/go-pattern-examples.git
synced 2024-11-30 07:26:01 +03:00
20 lines
212 B
Go
20 lines
212 B
Go
package iterator
|
|
|
|
func ExampleIterator() {
|
|
var aggregate Aggregate
|
|
aggregate = NewNumbers(1, 10)
|
|
|
|
IteratorPrint(aggregate.Iterator())
|
|
// Output:
|
|
// 1
|
|
// 2
|
|
// 3
|
|
// 4
|
|
// 5
|
|
// 6
|
|
// 7
|
|
// 8
|
|
// 9
|
|
// 10
|
|
}
|