Summary

In this chapter, you learned how to combine Immutable.js collections, starting with merging maps together. When maps are merged, there are usually conflicts with keys. You get to decide what happens when there's a conflict. When merging lists, conflicts are based on indexes and these need to be dealt with accordingly.

We then looked at concatenating lists of values. Side-effects have an easier time dealing with one collection instead of several collections. You can lazily concatenate collections using sequences so that you don't have to allocate new collections.

Interposing values into collections means putting the same value in-between every collection value. Interleaving collections balances the placement of values from several collections into one collection.

In the next chapter, you'll see how we can use immutable collections to help us write better declarative code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.70.203