Ints? In the current approach, it would require us to create another class just for this purpose. We can, however, add a type parameter to the
a(such as supporting arithmetic operations, or having defined some other methods). Once you use such properties, Luna typechecker automatically keeps track of them and checks whether they are satisfied. For example:
dotProductmethod will work with any elements supporting addition and multiplication, so using it with
Reals is fine, while using it with
Textresults in a type error.