summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcd.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcd.go b/gcd.go
index 21e5371..fbd8c6a 100644
--- a/gcd.go
+++ b/gcd.go
@@ -38,8 +38,8 @@ func gcd2(a, b uint64) uint64 {
}
func gcdn(ns []uint64) (r uint64) {
- for i := range ns {
- r = gcd2(r, ns[i])
+ for _, v := range ns {
+ r = gcd2(r, v)
}
return
}