---
title: "forEach(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/meshbuffer/foreach(_:)"
---

# forEach(_:)

Iterate over pairs of elements.

## Declaration

```swift
func forEach(_ body: (Element, Element) throws -> Void) rethrows
```
