F# modeling playing cards
问题 I am trying to represent standard playing cards in F#. My goal is to implement a clone of Microsoft Solitaire (the one that comes with Windows) , a game in which Cards' Suit, Face, and Color are important. This exercise is mostly intended as a way to learn some F#. I have considered using discriminated unions: type Suit = | Diamonds | Hearts | Clubs | Spades type Color = | Red | Black type Face = Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten | Jack | Queen | King | Ace with a