-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I was porting your C# code to F# when I've realized that something didn't add up and most notably how merging quantities is achieved in the current implementation:
Not only there is a redundant check as part of the current implementation:
but actually considering how data are stored:
I think it would be relevant to use a map or a dictionary to store the priced items.
It would make the whole consistency check a lot simpler.
Also why bother throwing exceptions when you can add a product when the same product isn't already part of the collection and then merge quantities when it is.
Wdyt?
akhansari
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request