Anonymous user
Compare a list of strings: Difference between revisions
→{{header|Go}}: optimization is the job of the compiler, not of the human
(→{{header|C++}}: document undefined behavior) |
(→{{header|Go}}: optimization is the job of the compiler, not of the human) |
||
Line 1,132:
func AllEqual(strings []string) bool {
if len(strings) < 2 {▼
▲ for _, s := range strings[1:] {
return false
}
Line 1,146 ⟶ 1,141:
func AllLessThan(strings []string) bool {
▲ last := strings[0]
return false
}
}
return true
|