I receive a warning for the following code:
| _ -> let card1::card2::remainingDeck = newDeck
Some(card1, card2), remainingDeck
Incomplete pattern matches on this expression. For example, the value '[_]' may indicate a case not covered by the pattern(s).
Here's the rest of the code:
let newDeck = [for suit in suits do
for face in faces do
yield {Face=face; Suit=suit}]
let deal = function
| card1::card2::remaining -> Some(card1, card2), remaining
| _ -> let card1::card2::remainingDeck = newDeck
Some(card1, card2), remainingDeck
I have noticed that after several minutes of my editor being idle, when I build my solution again, the warning goes away.
Am I doing something wrong?