Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(Feature request) OrderedMap#split #292

Closed
@XeCycle

Description

@XeCycle

Similar to Data.Map.Lazy.split:

split :: Ord k => k -> Map k a -> (Map k a, Map k a)

O(log n). The expression (split k map) is a pair (map1,map2) where the keys in map1 are smaller than k and the keys in map2 larger than k. Any key equal to k is found in neither map1 nor map2.

Could be faster than takeWhile(), skipWhile(), etc.

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