scala - Zipper vs. iterator for walking over a list or tree -


suppose need walk on list or tree read (but not modify) data. can use either iterator or zipper. zipper have advantages aside immutability in case?

do need backtrack or otherwise move around in structure in non-sequential order? want able traverse structure multiple times without worrying left iteration? want avoid thinking concurrent access or thread safety? go zipper.

do know fact need performance iterator can provide in situations? working on team doesn't want learn new abstraction? go iterator.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -