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

# forEach(_:)

Iterate over three elements per step.

## Declaration

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

## See Also

### Iterating the elements of a buffer

- [forEach(_:)](realitykit/meshbuffer/foreach(_:)-53vhs.md)
- [forEach(_:)](realitykit/meshbuffer/foreach(_:)-xhri.md)
- [usingRate(_:)](realitykit/meshbuffer/usingrate(_:).md)
