[Haskell-cafe] Data.Map - visiting tree nodes withi a given key range ?

Olaf Klinke olf at aatal-apotheke.de
Sun Mar 15 13:37:16 UTC 2020

You can roll your own indexKeyRange using the Data.Map.Internal module which exposes the (currently used) Map implementation. Also note that if the list of values in range is to be consumed immediately, you might want to go for a fold-based function:

foldlWithRange :: (a -> k -> b -> a) -> (a,a) -> b -> Map k a -> b


More information about the Haskell-Cafe mailing list