---
title: MPSGraphForLoopBodyBlock
framework: metalperformanceshadersgraph
role: symbol
role_heading: Type Alias
path: metalperformanceshadersgraph/mpsgraphforloopbodyblock
---

# MPSGraphForLoopBodyBlock

A block for the body in the for loop.

## Declaration

```swift
typealias MPSGraphForLoopBodyBlock = (MPSGraphTensor, [MPSGraphTensor]) -> [MPSGraphTensor]
```

## Parameters

- `index`: The for loop index per iteration, it is a scalar tensor.
- `iterationArguments`: Arguments for this iteration, with the same count and corresponding element types as initialIterationArguments and return types of the for loop.

## Return Value

Return Value A valid MPSGraphTensor array with same count and corresponding element types as initialIterationArguments and return types of the for loop.
