5S6DMMS6RNLBCD4C5H2YCQMKS3IMJX7YBQOL5Q6ZLQ6H5AFKSKYQC
4K7I3AJQDM4TLBF45D5FTFH2STCRYVQJQSPDI3UW4TEIW33AAYNQC
J4QXG3NCNCHLF2Z7FERKXPBZKL45MPMZQ2XLKPLURAOIRGHGF7IQC
5SNPPY36EWEDXN6F57PXNPXJNOM5OZESSFHZ2NLPEU74UDWKHPEAC
WRLD7PACYNQI2F3MAYAM5OK4RHO7CZ4OMYWAZ37UQY2IJ4AYS7LAC
DOPKLXQZP3TDISHODQNI6GZ57EYE42NG225WHSZMQ3L355YVYPNAC
DN2F55HBRBTHQAJDU4GOOGAEAXH5MIFPQSPEK2NNAPDJPZOOFJFQC
7NUEWNIMPWOFZAMPOK7QJH2AGZGS2SYTPZ5MVFI24KQG23WKRA2AC
DRHZBHR7G5UEXWJNZ4FWF63YCUIYMIM3B7JEUL5CC4ZY2UKE3CJAC
44NEK2567V735JWLV2XABNGNW43WOIB5HSPVQJ6672TAP3K5VZZQC
remove cardName categoryName decklist =
R
$ Map.update
( \card ->
let newCard = over categories (Map.delete (toText categoryName)) card
in if Map.null $ newCard ^. categories
then Nothing
else Just newCard
)
(toText cardName)
$ unR decklist