F# - constructing nested types
问题 I guess this is pretty basic F# question: Types are: type Id1 = | Id1 of int type Id2 = | Id2 of string type Id = | Id1 | Id2 type Child = { Id : Id; Smth : string list } type Node = | Child of Child | Compos of Node * Node where Node and Child should represent replacement for Composite OOP design pattern. The problem is that I cannot instantiate types in this way: let i1 : Child = {Id = Id1(1); Smth = []} //Id1 value is not a function and cannot be applied let i2 : Child = {Id = Id1(1); Smth