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 |
What does map in scala collection?
Difference between Array and List in Scala?
Which scala library is used for the functional programming?
Why do we use =(equal) operator in scala function?
What is scala closure?
Why Scala does NOT have 'static' keyword? What is the main reason for this decision?
Why scala is faster than java?
Explain traits in scala.
Mention the identifiers in scala?
How to define Factory methods using object keyword in Scala? What is the use of defining Factory methods in object?
What is the use of 'object' keyword in Scala? How to create Singleton objects in Scala?
What is anonymous (lambda) function in scala?