collections - Scala's MapLike, ListLike, SeqLike, etc how does each compare to Map, List, Seq? -


Does anyone help me understand the various "like" symptoms of Scala's collection API? I am reading and reading and trying to compare everyone without luck. I think I can see that for example the map increases mapline - adding 2 concrete methods but why does this raise the question why do all this? Why not map 1 map in Collections API instead of map and map?

Thank you!

The best source of these details is:

Scala archive library code Duplication avoids and receives "same-result-type" principle using generic builders and traversals from the collections of so-called implementation properties . These symptoms have been named as the as suffix; For example, there is an implementation property for IndexedSeqLike IndexedSeq , and similarly, traceable likes implementation properties traversable For these collection codes such as traversal or IndexedSeq receive all their solid method implementations with these symptoms. Instead of the one for the general collection, there are two types of parameters of implementation, they not only quantify on the element type of the collection, but also the representation type , or of the collection, the underlying compilation The type of type like Seq [I] or list [T] ...

The entire article is very useful if you use the Archive API Want to integrate your collection classes together, or if you have a library It has a deeper understanding of how it works.

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -