【发布时间】:2018-03-26 03:38:10
【问题描述】:
我是 SML 的新手。我尝试在下面创建和测试以下函数,但收到错误消息。不知道是什么问题。
fun isOld(pFirstTuple: int*int*int, pSecondTuple: int*int*int) =
if (#1 pFirstTuple) < (#1 pSecondTuple)
then
true
if (#1 pFirstTuple) = (#1 pSecondTuple)
then
if (#2 pFirstTuple) < (#2 pSecondTuple)
then
true
else
false
我试过这个命令“val p = isOld((8,9,10),(10,11,12))”,但它显示了以下错误未绑定变量或构造函数 .我该如何解决这个问题?
【问题讨论】:
标签: sml