first run at an api

This commit is contained in:
Barak Michener 2014-09-01 14:07:10 -04:00
parent ca8c1912de
commit 5451d07ff5
3 changed files with 249 additions and 0 deletions

View file

@ -165,6 +165,9 @@ type Description struct {
Iterators []Description `json:",omitempty"`
}
// A curried function that can generates a new iterator based on some prior iterator.
type MorphismFunc func(Iterator) Iterator
type Nexter interface {
// Next advances the iterator to the next value, which will then be available through
// the Result method. It returns false if no further advancement is possible, or if an