Play with syntax
This commit is contained in:
@@ -13,7 +13,7 @@ updateNCopies 0 card otherCards = otherCards
|
||||
updateNCopies n card (c: t) = c {nCopies = nCopies card + nCopies c}: updateNCopies (n - 1) card t
|
||||
|
||||
updateCopies :: Card -> [Card] -> [Card]
|
||||
updateCopies card otherCards = let nWinningNumbers = getNWinningNumbers (winningNumbers card) (numbers card)
|
||||
updateCopies card otherCards = let nWinningNumbers = getNWinningNumbers (winningNumbers card) $ numbers card
|
||||
in updateNCopies nWinningNumbers card otherCards
|
||||
|
||||
updateAllCopies :: [Card] -> [Card]
|
||||
@@ -21,4 +21,4 @@ updateAllCopies [] = []
|
||||
updateAllCopies (c: t) = c: updateAllCopies (updateCopies c t)
|
||||
|
||||
getNCopies :: [Card] -> [Int]
|
||||
getNCopies cards = map nCopies (updateAllCopies cards)
|
||||
getNCopies cards = map nCopies $ updateAllCopies cards
|
||||
|
||||
Reference in New Issue
Block a user