【发布时间】:2018-10-05 10:43:21
【问题描述】:
当我尝试写类似的东西时
fun test Fifo.empty = true
| test _ = false`
我收到一条错误消息,内容为 Error: variable found where constructor is required: Fifo.empty。我对 SML/NJ 真的很陌生。原来它与Fifo.empty 是一个longId 有关,但我还没有想出如何解决这个问题,除了通过传递Fifo.isEmpty 作为参数来修补它,但这几乎不是一个解决方案......
【问题讨论】:
标签: pattern-matching sml fifo smlnj