9:59 AM
あった!!
10:00 AM
Currently, Swift's generic parameters are always types. One could imagine allowing generic parameters that are values, e.g.,
10:00 AM
struct MultiArray<T, let Dimensions: Int> { // specify the number of dimensions to the array subscript (indices: Int...) -> T { get { require(indices.count == Dimensions) // ... } } (edited)
10:00 AM
例もまさに Vector<N> ですね。
10:01 AM
MayBe セクションだから
10:01 AM
ワンチャンあるで〜