Skip to content

group and groupBy #192

@andrewthad

Description

@andrewthad

In Data.List, we have:

group :: Eq a => [a] -> [[a]]
groupBy :: (a -> a -> Bool) -> [a] -> [[a]]

I would like to introduce analogous version into vector:

group :: Eq a => Vector -> [Vector a]
groupBy :: (a -> a -> Bool) -> Vector a -> [Vector a]

These have the potential to be much more space efficient than the list equivalents since they share the underlying array with the original vector. Would this be accepted if I added it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions