go-pattern-examples/behavior/04_iterator/iterator_test.go
2020-05-02 21:27:29 +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
}