Better for loop
1 files changed, 3 insertions(+), 1 deletions(-) M ui.go
M ui.go => ui.go +3 -1
@@ 132,7 132,9 @@ func GetBallotFromRankings(ranks []int) []byte { for len(candidates) > 0 { r := ranks[candidates[0]] i := 1 for ; i < len(candidates) && ranks[candidates[i]] == r; i++ {} for i < len(candidates) && ranks[candidates[i]] == r { i++ } // i is now index of the first candidate with worse (i.e. higher // in value) rank row := make([]byte, n)