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)