---
title: "prefix(_:)"
framework: combine
role: symbol
role_heading: Instance Method
path: "combine/just/prefix(_:)"
---

# prefix(_:)

## Declaration

```swift
func prefix(_ maxLength: Int) -> Optional<Output>.Publisher
```

## See Also

### Applying sequence operations to elements

- [dropFirst(_:)](combine/just/dropfirst(_:).md)
- [drop(while:)](combine/just/drop(while:).md)
- [append(_:)](combine/just/append(_:)-7eyqj.md)
- [append(_:)](combine/just/append(_:)-7sxlu.md)
- [prepend(_:)](combine/just/prepend(_:)-39e57.md)
- [prepend(_:)](combine/just/prepend(_:)-7fg73.md)
- [prefix(while:)](combine/just/prefix(while:).md)
