A grasp of immutable datastructures
I am learning scala and as a good student I try to obey all rules I found. One rule is: IMMUTABILITY!!! So I have tried to code everything with immutable data structures and vals, and sometimes this is really hard. But today I thought to myself: the only important thing is that the object/class should have no mutable state. I am not forced to code all methods in an immutable style, because these methods don't affect each other. My Question: Am I correct or are there any problems/disadvantages I dont see ? EDIT: Code example for aishwarya: def logLikelihood(seq: Iterator[T]): Double = { val