mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 02:26:42 +00:00
11 lines
149 B
Go
11 lines
149 B
Go
package underscore
|
|
|
|
func Max[T numbers](values []T) T {
|
|
max := values[0]
|
|
for _, v := range values {
|
|
if v > max {
|
|
max = v
|
|
}
|
|
}
|
|
return max
|
|
}
|