Skip to content

Commit ddca78e

Browse files
committed
Change example to not be contrived due to a duplicate value
1 parent 5aec998 commit ddca78e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

containers/src/Data/Map/Strict/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,9 +1661,9 @@ fromDescListWith f xs
16611661
-- if the precondition may not hold.
16621662
--
16631663
-- > let f k a1 a2 = (show k) ++ ":" ++ a1 ++ a2
1664-
-- > fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")] == fromList [(3, "b"), (5, "5:b5:ba")]
1665-
-- > valid (fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")]) == True
1666-
-- > valid (fromAscListWithKey f [(5,"a"), (3,"b"), (5,"b"), (5,"b")]) == False
1664+
-- > fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"c")] == fromList [(3, "b"), (5, "5:c5:ba")]
1665+
-- > valid (fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"c")]) == True
1666+
-- > valid (fromAscListWithKey f [(5,"a"), (3,"b"), (5,"b"), (5,"c")]) == False
16671667
--
16681668
-- Also see the performance note on 'fromListWith'.
16691669

0 commit comments

Comments
 (0)