I am still sometimes puzzled by scala occasional syntactic magic.
I thought, that writing
array(5)
is just a shortcut for
array.apply(5). (As is written in the documentation for Array.)
However, I can do quite happily
array(5) = 3
But I cannot do
array.apply(5) = 3.
What is going on?