File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
containers/src/Data/Containers Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 17
17
-- In the documentation, \(n\) is the number of elements in the list while
18
18
-- \(d\) is the number of distinct elements in the list. \(W\) is the number
19
19
-- of bits in an 'Int'.
20
+ --
21
+ -- @since 0.6.0.1
20
22
-----------------------------------------------------------------------------
21
23
22
24
module Data.Containers.ListUtils (
@@ -53,6 +55,8 @@ import GHC.Exts ( build )
53
55
-- pathological cases. For example, to nub a list of characters, use
54
56
--
55
57
-- @ nubIntOn fromEnum xs @
58
+ --
59
+ -- @since 0.6.0.1
56
60
nubOrd :: Ord a => [a ] -> [a ]
57
61
nubOrd = nubOrdOn id
58
62
{-# INLINE nubOrd #-}
@@ -65,6 +69,8 @@ nubOrd = nubOrdOn id
65
69
--
66
70
-- @nubOrdOn@ is strict in the values of the function applied to the
67
71
-- elements of the list.
72
+ --
73
+ -- @since 0.6.0.1
68
74
nubOrdOn :: Ord b => (a -> b ) -> [a ] -> [a ]
69
75
-- For some reason we need to write an explicit lambda here to allow this
70
76
-- to inline when only applied to a function.
@@ -129,6 +135,8 @@ constNubOn x _ = x
129
135
-- ==== Strictness
130
136
--
131
137
-- @nubInt@ is strict in the elements of the list.
138
+ --
139
+ -- @since 0.6.0.1
132
140
nubInt :: [Int ] -> [Int ]
133
141
nubInt = nubIntOn id
134
142
{-# INLINE nubInt #-}
@@ -142,6 +150,8 @@ nubInt = nubIntOn id
142
150
--
143
151
-- @nubIntOn@ is strict in the values of the function applied to the
144
152
-- elements of the list.
153
+ --
154
+ -- @since 0.6.0.1
145
155
nubIntOn :: (a -> Int ) -> [a ] -> [a ]
146
156
-- For some reason we need to write an explicit lambda here to allow this
147
157
-- to inline when only applied to a function.
You can’t perform that action at this time.
0 commit comments