Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fork
subtract
functions into safe and unsafe variants.
This change explicitly forks the various `subtract` functions into safe and unsafe variants for the following types: - `TokenQuantity` - `TokenMap` - `TokenBundle` The safe variants all adhere to the following pattern: ``` -- Returns 'Nothing' if the pre-condition is violated. subtract :: T -> T -> Maybe T ``` The unsafe variants all adhere to the following pattern: ``` -- Throws a run-time exception if the pre-condition is violated. unsafeSubtract :: T -> T -> T ```
- Loading branch information
1 parent
c962fe5
commit ef1a361
Showing
6 changed files
with
97 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters