go-pattern-examples/behavior/12_iterator/iterator_test.go
2020-04-21 22:53:23 +08:00

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
}