mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 02:26:42 +00:00
7 lines
139 B
Go
7 lines
139 B
Go
package underscore
|
|
|
|
// Last returns the last element of the slice
|
|
func Last[T any](values []T) T {
|
|
n := len(values)
|
|
return values[n-1]
|
|
}
|