method with angle brackets (<>)

Viewed 2454

Is it possible to have angle brackets in method names , e.g. :

class Foo(ind1:Int,ind2:Int){...}
var v = new Foo(1,2)
v(1) = 3 //updates ind1
v<1> = 4 //updates ind2

The real situation is obviously more complicated than this!!I am trying to provide a convenient user interface.

3 Answers
Related