]> Cypherpunks repositories - gostls13.git/commitdiff
container/heap: avoid and/or ambiguity in documentation
authorRobert Griesemer <gri@golang.org>
Mon, 10 Feb 2014 20:48:56 +0000 (12:48 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 10 Feb 2014 20:48:56 +0000 (12:48 -0800)
(per suggestion by Doug McIlroy)

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/50580046

src/pkg/container/heap/heap.go

index 52c8507b4219bfe9af5a19d449b2fcf0bd2b5e52..3fe2327ad2dab76673edc1b63e6a1eb07d5b9d6c 100644 (file)
@@ -22,7 +22,7 @@ import "sort"
 // min-heap with the following invariants (established after
 // Init has been called or if the data is empty or sorted):
 //
-//     !h.Less(j, i) for 0 <= i < h.Len() and j = 2*i+1 or 2*i+2 and j < h.Len()
+//     !h.Less(j, i) for 0 <= i < h.Len() and 2*i+1 <= j <= 2*i+2 and j < h.Len()
 //
 // Note that Push and Pop in this interface are for package heap's
 // implementation to call.  To add and remove things from the heap,