What is the difference between :: and #:: in Scala? What is the difference between ::: and #::: in Scala?
Answer / Arnab Ghosh
[":: (cons) and #:: (reverse cons) are used for appending elements to lists. The difference is that :: places the element at the head of the list, while #:: places it at the tail. ::: and #::: concatenate two lists with :: and #:: respectively, but they do not reverse the order as their counterparts."]
| Is This Answer Correct ? | 0 Yes | 0 No |
Can scala learn without java?
What is hashset in scala collection?
What are the different types of Scala literals?
What is function composition in scala?
What is flatmap in scala?
What do you understand by an implicit parameter in scala ?
Explain any five string methods?
What are the differences between Case class and Normal Class?
What is a singleton object in scala?
What is unit in scala?
How can you format a string?
What is Either in Scala? What are Left and Right in Scala? Explain Either/Left/Right Design Pattern in Scala?