diff --git a/src/Data/List/Local.hs b/src/Data/List/Local.hs index 761b0e3..06405e0 100644 --- a/src/Data/List/Local.hs +++ b/src/Data/List/Local.hs @@ -27,11 +27,11 @@ import Data.List.NonEmpty (NonEmpty (..), (<|)) -- | Takes a list of pairs and groups them by consecutive ranges with equal -- first element. Returns a list of pairs, where each pair corresponds to one -- such range. -groupByFst :: Eq a => [(a, b)] -> [(a, [b])] -groupByFst [] = [] -groupByFst ((x, y):ps) = - let (same, rest) = span ((== x) . fst) ps - in (x, y : map snd same) : groupByFst rest +--groupByFst :: Eq a => [(a, b)] -> [(a, [b])] +--groupByFst [] = [] +--groupByFst ((x, y):ps) = +-- let (same, rest) = span ((== x) . fst) ps +-- in (x, y : map snd same) : groupByFst rest -- | Group together sublists of Just items, and drop the Nothing items. --