dadhi / ImTools

Fast and memory-efficient immutable collections and helper data structures
MIT License
232 stars 10 forks source link

ImMap and ImHashMap should provide enumeration without IEnumerable #26

Closed dadhi closed 4 years ago

dadhi commented 5 years ago

What we often need is invoking some method or delegate for each map element. We don't need a separate data structure for this - we may just pass the delegate to the iteration method. The cast of delegate creation usually is much smaller than support for IEnumerable/IEnumerator implementation.

dadhi commented 4 years ago

the Fold and Visit methods are added