Use of the and keyword in F# in discriminated unions
问题 I was faced today with the following DUs declarations: type Grammar = Definition list and Definition = Def of string * Expression and Range = | Char of char | Range of char * char Why would one use the keyword and instead of type , here? 回答1: The and is needed for the definitions of Grammar and Definition to compile correctly. The Grammar type is listed first but depends on the type Definition which is defined later. In order to compile properly it must be linked with and which tells the F#