sorted-list 0.1.6.1 → 0.2.0.0
raw patch · 2 files changed
+7/−7 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Data.SortedList: filterGT :: Ord a => a -> SortedList a -> SortedList a
- Data.SortedList: filterLT :: Ord a => a -> SortedList a -> SortedList a
+ Data.SortedList: filterGE :: Ord a => a -> SortedList a -> SortedList a
+ Data.SortedList: filterLE :: Ord a => a -> SortedList a -> SortedList a
Files
- Data/SortedList.hs +6/−6
- sorted-list.cabal +1/−1
Data/SortedList.hs view
@@ -30,8 +30,8 @@ , dropWhile , span , filter- , filterLT- , filterGT+ , filterLE+ , filterGE , partition -- * Queries #if !MIN_VERSION_base(4,8,0)@@ -227,15 +227,15 @@ filter f = fst . partition f -- | /O(n)/. Select only elements less or equal to the argument.-filterLT :: Ord a => a -> SortedList a -> SortedList a-filterLT a (SortedList l) = SortedList $ go l+filterLE :: Ord a => a -> SortedList a -> SortedList a+filterLE a (SortedList l) = SortedList $ go l where go (x:xs) = if x <= a then x : go xs else [] go [] = [] -- | /O(n)/. Select only elements greater or equal to the argument.-filterGT :: Ord a => a -> SortedList a -> SortedList a-filterGT a (SortedList l) = SortedList $ go l+filterGE :: Ord a => a -> SortedList a -> SortedList a+filterGE a (SortedList l) = SortedList $ go l where go (x:xs) = if a <= x then x : xs else go xs go [] = []
sorted-list.cabal view
@@ -1,5 +1,5 @@ name: sorted-list-version: 0.1.6.1+version: 0.2.0.0 synopsis: Type-enforced sorted lists and related functions. description: Type-enforced sorted lists and related functions. .