# Cannot append item to Seq

**URL:** <https://community.gatling.io/t/cannot-append-item-to-seq/1112>\
**Category:** Gatling (Open-Source)\
**Created:** [June 25, 2014, 7:55am UTC](https://community.gatling.io/t/cannot-append-item-to-seq/1112 "2014-06-25T07:55:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ictest0214](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@ictest0214](https://community.gatling.io/u/ictest0214)\
**Post date:** [June 25, 2014, 7:55am UTC](https://community.gatling.io/t/cannot-append-item-to-seq/1112/1 "2014-06-25T07:55:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [June 25, 2014, 9:38am UTC](https://community.gatling.io/t/cannot-append-item-to-seq/1112/2 "2014-06-25T09:38:33Z")

</div>

> This doesn’t work

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

---

<div class="post-metadata">

**Author:** ![ictest0214](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@ictest0214](https://community.gatling.io/u/ictest0214)\
**Post date:** [June 26, 2014, 3:09am UTC](https://community.gatling.io/t/cannot-append-item-to-seq/1112/3 "2014-06-26T03:09:56Z")

</div>

Thanks Stéphane,

I use:

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

And it worked.
