Scala has diverse approaches for writing code, but there are shared principles among them.
data can't be modified "somewhere else" by "somebody else" state external to a function cannot change, code is easier to understand; that's also called local reasoning resiliency to data corruption as concurrent data modification is not possible greater thread-safety and simpler concurrent programming in general
[
add
]
[
|
|
...
]