Skip to content

Commit

Permalink
fixing doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
noinia committed Nov 17, 2023
1 parent 741dd2c commit 1b91626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hgeometry/src/HGeometry/LowerEnvelope/AdjListForm.hs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ instance HasEdges (LowerEnvelope plane) (LowerEnvelope plane) where
-- running time: \(O(n\log n)\)
--
-- >>> groupOnCheap fst [ (1,"foo"), (2,"bar"), (2,"blaa"), (1,"boeez"), (1,"blap"), (4,"blax"), (4,"bleh"), (100,"floep")]
--
-- [[(1,"foo"),(1,"boeez"),(1,"blap")],[(2,"bar"),(2,"blaa")],[(4,"blax"),(4,"bleh")],[(100,"floep")]]
groupOnCheap :: (Foldable f, Ord b)
=> (a -> b) -> f a -> [NonEmptyV.NonEmptyVector a]
groupOnCheap f = fmap NonEmptyV.unsafeFromVector . V.groupBy ((==) `on` f) . sortOnCheap f
Expand Down

0 comments on commit 1b91626

Please sign in to comment.