---
title: "append(_:)"
framework: combine
role: symbol
role_heading: Instance Method
path: "combine/publisher/append(_:)-5yh02"
---

# append(_:)

Appends the output of this publisher with the elements emitted by the given publisher.

## Declaration

```swift
func append<P>(_ publisher: P) -> Publishers.Concatenate<Self, P> where P : Publisher, Self.Failure == P.Failure, Self.Output == P.Output
```

## Parameters

- `publisher`: The appending publisher.

## Return Value

Return Value A publisher that appends the appending publisher’s elements after this publisher’s elements.

## Discussion

Discussion Use append(_:) to append the output of one publisher to another. The append(_:) operator produces no elements until this publisher finishes. It then produces this publisher’s elements, followed by the given publisher’s elements. If this publisher fails with an error, the given publishers elements aren’t published. In the example below, the append publisher republishes all elements from the numbers publisher until it finishes, then publishes all elements from the otherNumbers publisher: let numbers = (0...10) let otherNumbers = (25...35) cancellable = numbers.publisher     .append(otherNumbers.publisher)     .sink { print("\($0)", terminator: " ") }

// Prints: "0 1 2 3 4 5 6 7 8 9 10 25 26 27 28 29 30 31 32 33 34 35 "

## See Also

### Applying sequence operations to elements

- [drop(untilOutputFrom:)](combine/publisher/drop(untiloutputfrom:).md)
- [dropFirst(_:)](combine/publisher/dropfirst(_:).md)
- [drop(while:)](combine/publisher/drop(while:).md)
- [tryDrop(while:)](combine/publisher/trydrop(while:).md)
- [append(_:)](combine/publisher/append(_:)-1qb8d.md)
- [append(_:)](combine/publisher/append(_:)-69sdn.md)
- [prepend(_:)](combine/publisher/prepend(_:)-7wk5l.md)
- [prepend(_:)](combine/publisher/prepend(_:)-v9sb.md)
- [prepend(_:)](combine/publisher/prepend(_:)-5dj9c.md)
- [prefix(_:)](combine/publisher/prefix(_:).md)
- [prefix(while:)](combine/publisher/prefix(while:).md)
- [tryPrefix(while:)](combine/publisher/tryprefix(while:).md)
- [prefix(untilOutputFrom:)](combine/publisher/prefix(untiloutputfrom:).md)
