Skip to content

Instantly share code, notes, and snippets.

@misterspeedy
Created October 7, 2013 21:58
Show Gist options
  • Save misterspeedy/6875648 to your computer and use it in GitHub Desktop.
Save misterspeedy/6875648 to your computer and use it in GitHub Desktop.
Royal Flush active pattern.
let (|RoyalFlush|_|) (hand : Hand) =
if (hand.Cards.[0].Rank) = Ace && (Consecutive hand.Cards) && (SameSuit hand.Cards) then
RoyalFlush |> Some
else
None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment