class X def foo(args as vari int) as int sum = 0 for arg in args, sum += arg return sum get [args as vari int] as int sum = 0 for arg in args, sum += arg return sum class P def main x = X() assert x.foo(3) == 3 assert x.foo(3, 5) == 8 assert x[3] == 3 assert x[3, 5] == 8