Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 372 Bytes

README.md

File metadata and controls

14 lines (12 loc) · 372 Bytes

Straight

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:

straight : card * card * card * card * card -> bool

which evaluates to true iff the hand contains a straight, namely five cards in sequential order, possibly with different suites.