Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into use of MonoidMap #2300

Open
byorgey opened this issue Jan 25, 2025 · 0 comments
Open

Look into use of MonoidMap #2300

byorgey opened this issue Jan 25, 2025 · 0 comments
Labels
Z-Feature A new feature to be added to the game. Z-Refactoring This issue is about restructuring the code without changing the behaviour to improve code quality.

Comments

@byorgey
Copy link
Member

byorgey commented Jan 25, 2025

monoidmap is a really nice package which defines total k -> v mappings where v must be a Monoid. Any k -> v mapping where v is mempty is not stored. I only just discovered this package (thanks to this toot) but it occurs to me that we might be able to use it to simplify some things; for example I'm pretty sure Inventory fits into this model very nicely.

@byorgey byorgey added Z-Feature A new feature to be added to the game. Z-Refactoring This issue is about restructuring the code without changing the behaviour to improve code quality. labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Feature A new feature to be added to the game. Z-Refactoring This issue is about restructuring the code without changing the behaviour to improve code quality.
Projects
None yet
Development

No branches or pull requests

1 participant