on master help sign in
Add notes about using different map types
6dc5876Harendra Kumar
core/src/Streamly/Internal/Data/Fold.hs+8
@@ -212,6 +212,14 @@ module Streamly.Internal.Data.Fold
212 -- ** Classifying
212 -- ** Classifying
213 -- | In an input stream of key value pairs fold values for different keys
213 -- | In an input stream of key value pairs fold values for different keys
214 -- in individual output buckets using the given fold.
214 -- in individual output buckets using the given fold.
215+ --
216+ -- Different types of maps can be used with these combinators via the IsMap
217+ -- type class. Hashmap performs better when there are more collisions, trie
218+ -- Map performs better otherwise. Trie has an advantage of sorting the keys
219+ -- at the same time. For example if we want to store a dictionary of words
220+ -- and their meanings then trie Map would be better if we also want to
221+ -- display them in sorted order.
222+
215 , classify
223 , classify
216 , classifyWith
224 , classifyWith
217 , classifyMutWith
225 , classifyMutWith