我一直在 getnumfrmcard (xs) 的第一个参数和 (<) 的第二个参数即 getnumfrmcard(xs) 函数中得到一个无法匹配预期类型 Card 和实际类型 [Card]牌是顺子)
enter code here
data Card = Cards (Suit,Face) deriving (Eq)
data Hand= Hands[Card]
straight:: Hand->Bool
straight (Hands [] ) =True
straight (Hands (x:xs) )
| null(xs)==True = True
| getnumfrmcard (x) < getnumfrmcard (xs) =straight (Hands xs)
| otherwise = False