【发布时间】:2020-06-09 15:20:15
【问题描述】:
val test1 = [(1,5,3),(3,5,2),(3,4,5)]
fun number_in_month dates_and_month =
case dates_and_month of
(x,y,z)::xs' => y :: number_in_month xs'
当我在 REPL 中使用 test1 运行时,此代码会产生以下错误:
未捕获的异常匹配 [非详尽匹配失败] 提出于:hw1pm.sml:28.49
有什么线索吗?
【问题讨论】:
标签: tuples pattern-matching sml smlnj