0
我有一個記錄類型匹配,例如:模式從一個記錄類型
Record matrixInt : Type := mkMatrixInt {
const : vector nat dim;
args : vector (matrix dim dim) argCnt
}.
我有一個模式匹配它返回的matrixInt
的類型,我把它叫做p
例如:(其中function_name p
將返回。一類matrixInt
我想p
分成2個字段:const
和args
,例如守則草案我想:
Definition my_function cons arg p :=
match function_name p with
| const => const + cons
| args => args + arg
end.
請你幫我寫模式匹配p
,返回2個字段const; args
? 非常感謝!