ECXGMI6YGVJZGNZNJRG4DA7EHUOQAVDTGJH3UBPPHAGMB72AJ2ZAC
XQBYALGEDBGQIHMEI4FFDGMQCMOPE4SJLBDROYF5YVMU7H5IKV6AC
DOPKLXQZP3TDISHODQNI6GZ57EYE42NG225WHSZMQ3L355YVYPNAC
7NUEWNIMPWOFZAMPOK7QJH2AGZGS2SYTPZ5MVFI24KQG23WKRA2AC
import Data.Maybe
chunk = undefined
chunk cardToChange changes decklist = R $ let updateCard oldCard = foldl (\acc x -> acc >>= unR x) (Just oldCard) changes in unR decklist & ix (toText cardToChange) %~ (\x -> fromMaybe x (updateCard x))
chunk cardToChange changes decklist =
R $
let updateCard oldCard = foldl (\acc x -> acc >>= unR x) (Just oldCard) changes
in unR decklist & ix (toText cardToChange) %~ (\x -> fromMaybe x (updateCard x))