Created
June 21, 2011 17:20
-
-
Save shangaslammi/1038364 to your computer and use it in GitHub Desktop.
Defining poker hands in Haskell using custom combinators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match High = 1 `with` same value | |
match Pair = 2 `with` same value | |
match TwoPair = 2 `with` same value `plus` 2 `with` same value | |
match ThreeOfKind = 3 `with` same value | |
match Straight = 5 `with` sequential value | |
match Flush = 5 `with` same suit | |
match FullHouse = 3 `with` same value `plus` 2 `with` same value | |
match FourOfKind = 4 `with` same value | |
match StraightFlush = 5 `with` same suit `and` sequential value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment