Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IteratorPrint ¶
func IteratorPrint(i Iterator)
Types ¶
type Iterator ¶
type Iterator interface { First() IsDone() bool Next() interface{} }
Example ¶
var aggregate Aggregate aggregate = NewNumbers(1, 10) IteratorPrint(aggregate.Iterator())
Output: 1 2 3 4 5 6 7 8 9 10
type NumbersIterator ¶
type NumbersIterator struct {
// contains filtered or unexported fields
}
func (*NumbersIterator) First ¶
func (i *NumbersIterator) First()
func (*NumbersIterator) IsDone ¶
func (i *NumbersIterator) IsDone() bool
func (*NumbersIterator) Next ¶
func (i *NumbersIterator) Next() interface{}
Click to show internal directories.
Click to hide internal directories.