X-Git-Url: https://git.distorted.org.uk/~mdw/fringe/blobdiff_plain/d888ccd559a84c180936e9adadae1f655f15356e..b173210012e9792d8a334f8f48d587d69e4c6503:/go-fringe.go diff --git a/go-fringe.go b/go-fringe.go index 70e23b5..d79760e 100644 --- a/go-fringe.go +++ b/go-fringe.go @@ -52,9 +52,8 @@ func MakeIterator(it Iterable) Iterator { // Returns the next item from an iterator IT. If there is indeed an item // available, return it and true; otherwise return nil and false. func (it Iterator) Next() (any, bool) { - item := <-it; - if closed(it) { return nil, false; } - return item, true; + item, anyp := <-it; + return item, anyp; } // Answer whether the iterators return the same items in the same order.