Commit 3a012c02 authored by Rob Pike's avatar Rob Pike

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
parent 15f276bc
...@@ -49,9 +49,9 @@ func (ms *multiSorter) Swap(i, j int) { ...@@ -49,9 +49,9 @@ func (ms *multiSorter) Swap(i, j int) {
} }
// Less is part of sort.Interface. It is implemented by looping along the // 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 functions until it finds a comparison that is either Less or
// !Less. Note that it can call the ordering functions twice per call. We // !Less. Note that it can call the less functions twice per call. We
// could change the ordering functions to return -1, 0, 1 and reduce the // could change the functions to return -1, 0, 1 and reduce the
// number of calls for greater efficiency: an exercise for the reader. // number of calls for greater efficiency: an exercise for the reader.
func (ms *multiSorter) Less(i, j int) bool { func (ms *multiSorter) Less(i, j int) bool {
p, q := &ms.changes[i], &ms.changes[j] p, q := &ms.changes[i], &ms.changes[j]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment