 struct Mat<R:Nat, C:Nat>: Matrix {
     private var rows: Int
     private var cols: Int
+    let count: Int
     var m: [Float]
     subscript( row: Int, col: Int ) -> Float {
         get {

protocol Matrix {
    var m : [Float] { get set }
    subscript( row: Int, col: Int ) -> Float { get set }
}


        set( newValue ) {
            m[ cols * row + col ] = newValue
        }
    }
    subscript( i: Int ) -> Float {
        get {
            return m[ i ]
        }

        set( newValue ) {
            m[ i ] = newValue
        }
    }
    init( m:[Float] ) {
