Cannot append item to Seq

Hi,

I have a Seq:
var b = Seq((“b”,“5”),(“c”,“4”))

I’d like to append new item to “b”:
b :+ (“d”,“6”)

This doesn’t work. How to achieve this?

Thanks in advance.

This doesn’t work

Yes it does, just that Seq is immutable so :+ returns a new Seq

Thanks Stéphane,

I use:

b = b :+ (“d”,“6”)

And it worked.