# concatenate

Merges two lists.

```tql
concatenate(xs:list, ys:list) -> list
```

## Description

The `concatenate` function returns a list containing all elements from the lists `xs` and `ys` in order. The expression `concatenate(xs, ys)` is equivalent to `[...xs, ...ys]`.

## Examples

### Concatenate two lists

```tql
from {xs: [1, 2], ys: [3, 4]}
zs = concatenate(xs, ys)
```

```tql
{
  xs: [1, 2],
  ys: [3, 4],
  zs: [1, 2, 3, 4]
}
```

## See Also

* [`append`](https://preview.docs.tenzir.com/375/375/reference/functions/append.md)
* [`merge`](https://preview.docs.tenzir.com/375/375/reference/functions/merge.md)
* [`prepend`](https://preview.docs.tenzir.com/375/375/reference/functions/prepend.md)
* [`zip`](https://preview.docs.tenzir.com/375/375/reference/functions/zip.md)
* [Shape lists](https://preview.docs.tenzir.com/375/375/guides/transformation/shape-lists.md)
* [Learn idiomatic TQL](https://preview.docs.tenzir.com/375/375/tutorials/learn-idiomatic-tql.md)