-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lookupMin and lookupMax for IntSet
These already exist for Set, Map, and IntMap. Also * Update docs for lookupMin, lookupMax, findMin, findMax to be consistent for all the structures. * Modify IntMap's lookupMin and lookupMax impls so that Just is returned immediately and mark them INLINE. This allows GHC to inline and possibly eliminate the Maybe. Set and Map's lookupMin and lookupMax are already implemented in this style.
- Loading branch information
Showing
5 changed files
with
80 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,8 @@ module Data.IntSet ( | |
, fold | ||
|
||
-- * Min\/Max | ||
, lookupMin | ||
, lookupMax | ||
, findMin | ||
, findMax | ||
, deleteMin | ||
|
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