相关疑难解决方法(0)

使用只有一个元组值的变体类型构造函数

# type foo = Foo of int * int
# let t = (1, 2)
# Foo t
Error: The constructor Foo expects 2 argument(s),
   but is applied here to 1 argument(s)
Run Code Online (Sandbox Code Playgroud)

它是如何,我必须这样做Foo (1, 2),以避免错误甚至牛逼有合适的类型?

constructor ocaml

7
推荐指数
2
解决办法
1308
查看次数

标签 统计

constructor ×1

ocaml ×1