【问题标题】:SML specification for IntListSet structureIntListSet 结构的 SML 规范
【发布时间】:2015-05-07 07:12:48
【问题描述】:
val x =  IntListSet.listItems(IntListSet.addList(IntListSet.empty,[1,2,3,4,5,6]));

如果你在 SML 中运行它,它会返回

x = [1,2,3,4,5,6] : IntListSet.item list

我希望它返回

x = [1,2,3,4,5,6] : Int list

我该怎么办?

【问题讨论】:

    标签: sml smlnj


    【解决方案1】:

    你不需要做任何事情。 IntListSet.item 只是 Int.int 的别名,所以你的函数已经返回了正确的类型。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-08
      • 1970-01-01
      • 2021-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多