Skip to content

Instantly share code, notes, and snippets.

@misterspeedy
Created October 7, 2013 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misterspeedy/6875681 to your computer and use it in GitHub Desktop.
Save misterspeedy/6875681 to your computer and use it in GitHub Desktop.
Partial active pattern for Four of a Kind
let (|FourOfAKind|_|) (hand : Hand) =
if (RankCounts hand.Cards).[0] = 4 then
FourOfAKind |> Some
else
None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment