In my init function, I have:
self.x = [T](count: dimensions, repeatedValue: 0)
This does not work. How do I get this to work.
I want x to be an array with type T that is initialized to 0. (T is intuitively like Int but could be some other number representation.)
your code works, you just have to make sure
Tcan be converted from0(IntegerLiteralConvertible)or somehow make sure val have type of
T