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

Skip to content

(Feature request) OrderedMap#split #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
XeCycle opened this issue Jan 22, 2015 · 1 comment
Closed

(Feature request) OrderedMap#split #292

XeCycle opened this issue Jan 22, 2015 · 1 comment

Comments

@XeCycle
Copy link

XeCycle commented Jan 22, 2015

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.

@XeCycle
Copy link
Author

XeCycle commented Apr 10, 2015

I see I mistake OrderedMap as SortedMap (#88). Closing this, and +1 on that.

@XeCycle XeCycle closed this as completed Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant