Skip to content

[RFC] Integration with containers #35

@chshersh

Description

@chshersh

While using slist, I've noticed that sometimes I want to convert Map/Set to slist more efficiently than using the slist function. I'm thinking about adding integration with containers and providing functions:

mapToVals :: Map k v -> Slist v
mapToKeys :: Map k v -> Slist k
mapToPairs :: Map k v -> Slist (k, v)

setToSlist :: Set a -> Slist a

If we depend on containers, we also can provide a more efficient versions of some helpful functions:

ordNub :: Ord a => Slist a -> Slist a
countUnique :: Ord a => Slist a -> Int  -- number of unique elements

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions