Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 508 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 508 Bytes

Poker

Consider the following types to represent French-suited cards:

type suit = S | H | D | C;;
type card = Card of int * suit;;

Write a function with type:

rndHand : unit -> card * card * card * card * card

which generates a random hand of 5 cards.

Then, write a function with type:

poker : card * card * card * card * card -> bool

which evaluates to true iff the hand contains a poker, namely if there are four cards with the same value but different suites.