This is the corresponding code:
removeCard :: Card -> Tracker -> Tracker removeCard card tracker = filter (\cTracker -> ctCard cTracker /= card) tracker
Haskell gives me a warning here, saying that this should be written without a tracker on each side. Itโs easier for me to read my functions when all the arguments are there, since the argument names help clarify what the function does. I could change the order of the parameters, but it seems intuitive to me that if you call the removeCard function, the deleted card is the first parameter, so I donโt want to do that either. Is there a good argument for removing the last parameter?
EDIT: The original question was that Haskell was giving me an error, but it was an error with Syntastic, this is just a warning.
haskell
Marcus buffett
source share