最近我遇到了像这样的代码清单:
type MyType =
| MyType of int
and internal MyInternal =
| One of MyType
| Two of MyType
Run Code Online (Sandbox Code Playgroud)
我不熟悉'和内部'的用法(在第三行),我想知道使用'type internal'之间是否有任何区别:
type MyType =
| MyType of int
type internal MyInternal =
| One of MyType
| Two of MyType
Run Code Online (Sandbox Code Playgroud)
我简要地尝试了两种形式,但我看不出有什么区别.这只是两种不同的方式来写同样的东西吗?