go-pattern-examples/behavior/04_iterator/iterator_test.go

20 lines
212 B
Go
Raw Normal View History

2020-04-21 17:50:21 +03:00
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
}