fixed non exhaustive on rmFirstMatch
This commit is contained in:
parent
fe97ea1432
commit
43cd96e6cc
1
State.hs
1
State.hs
@ -39,6 +39,7 @@ numPut :: Either MainCharacter MainEva -> PutCards -> Integer
|
|||||||
numPut c p = toInteger $ length $ filter (\x -> (fst x) == c) p
|
numPut c p = toInteger $ length $ filter (\x -> (fst x) == c) p
|
||||||
|
|
||||||
rmFirstMatch :: [a] -> (a -> Bool) -> [a]
|
rmFirstMatch :: [a] -> (a -> Bool) -> [a]
|
||||||
|
rmFirstMatch [] _ = []
|
||||||
rmFirstMatch (l:ls) f
|
rmFirstMatch (l:ls) f
|
||||||
| f l = ls
|
| f l = ls
|
||||||
| otherwise = (l : rmFirstMatch ls f)
|
| otherwise = (l : rmFirstMatch ls f)
|
||||||
|
Loading…
Reference in New Issue
Block a user