mirror of
https://github.com/golang/go
synced 2024-11-13 17:50:23 -07:00
sort: be consistent when describing "less: function in the multiKeys example
s/ordering/less/g R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/8267043
This commit is contained in:
parent
15f276bc53
commit
3a012c02ed
@ -49,9 +49,9 @@ func (ms *multiSorter) Swap(i, j int) {
|
||||
}
|
||||
|
||||
// Less is part of sort.Interface. It is implemented by looping along the
|
||||
// ordering functions until it finds a comparison that is either Less or
|
||||
// !Less. Note that it can call the ordering functions twice per call. We
|
||||
// could change the ordering functions to return -1, 0, 1 and reduce the
|
||||
// less functions until it finds a comparison that is either Less or
|
||||
// !Less. Note that it can call the less functions twice per call. We
|
||||
// could change the functions to return -1, 0, 1 and reduce the
|
||||
// number of calls for greater efficiency: an exercise for the reader.
|
||||
func (ms *multiSorter) Less(i, j int) bool {
|
||||
p, q := &ms.changes[i], &ms.changes[j]
|
||||
|
Loading…
Reference in New Issue
Block a user