fun foo(list: List) { var index = 0 for (s in list) { print(s.substring(index++)) } }