9 lines
132 B
Nim
9 lines
132 B
Nim
proc p(xs: seq[string]): int =
|
|
for i, x in xs:
|
|
if x == "c":
|
|
return i
|
|
return -1
|
|
|
|
let xs = @["a", "b", "c"]
|
|
echo p(xs)
|