Hello everybody!
I have a simple problem.
I want to create a bunch of operations on some collection of objects. The size of collection is know at compilation time.
I would like something like this
trai MyCollection[N <: Nat]
def join[N: <: Nat, M: <: Nat](c1: MyCollection[N], c2: MyCollection[M]): MyCollection[N + M]= ...
or
def dot(N: <: Nat, M: <: Nat](c1: MyCollection[N], c2: MyCollection[M]): MyCollection[N + M -2]= ...
Of course, N + M doesn't compile.
is the any way to describe the result type as arithmetic expression of parameters type?
Thank you,
Andrey