mirror of https://github.com/status-im/nim-abc.git
7 lines
182 B
Nim
7 lines
182 B
Nim
|
func hasDuplicates*[T](elements: openArray[T]): bool =
|
||
|
for i in 0..<elements.len:
|
||
|
for j in i+1..<elements.len:
|
||
|
if elements[i] == elements[j]:
|
||
|
return true
|
||
|
false
|