恩歐式聯合

型別資訊不需要包含在歧視聯合的情況下。通過省略型別資訊,你可以建立一個簡單表示一組選項的聯合,類似於列舉。

// This union can represent any one day of the week but none of 
// them are tied to a specific underlying F# type
type DayOfWeek = Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday