# Missing \`append!\` method?

**URL:** <https://discourse.julialang.org/t/missing-append-method/21019>\
**Category:** General Usage\
**Created:** [February 20, 2019, 6:39pm UTC](https://discourse.julialang.org/t/missing-append-method/21019 "2019-02-20T18:39:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielmatz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielmatz/32/2285_2.png) [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Post date:** [February 20, 2019, 6:39pm UTC](https://discourse.julialang.org/t/missing-append-method/21019/1 "2019-02-20T18:39:06Z")

</div>

I just tried to do the following:

```julia
append!([1, 2], [3, 4], [5, 6])

```

And was surprised to find that there’s no such method. I was expecting it to be the equivalent of:

```julia
append!(append!([1, 2], [3, 4]), [5, 6])

```

Is this just a missing method that could be added, or is there a reason this isn’t supported?

---

<div class="post-metadata">

**Author:** ![Daniel\_Berge](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Daniel\_Berge](https://discourse.julialang.org/u/Daniel_Berge)\
**Post date:** [February 20, 2019, 6:51pm UTC](https://discourse.julialang.org/t/missing-append-method/21019/2 "2019-02-20T18:51:02Z")

</div>

You are probably looking for `vcat`.

`vcat([1, 2], [3, 4], [5, 6])`

On the other hand if you are looking to append multiple vectors for intance

```julia
a=[1,2]
b=[[3,4],[5,6]]
append!(a,Iterators.flatten(b))
a==1:6 #true

```

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [February 21, 2019, 1:05am UTC](https://discourse.julialang.org/t/missing-append-method/21019/3 "2019-02-21T01:05:12Z")

</div>

A general approach for case like this is `foldl` (or `reduce`): `foldl(append!, [[3, 4], [5, 6]], init=[1, 2])`

You can use it when you have a function that “aggregates” two inputs.
