---
title: "anyOrder(_:)"
framework: evaluations
role: symbol
role_heading: Type Method
path: "evaluations/toolexpectation/anyorder(_:)"
---

# anyOrder(_:)

Creates a group of expectations that must all be satisfied at the same sequential position, but can occur in any relative order.

## Declaration

```swift
static func anyOrder(_ expectations: [ToolExpectation]) -> ToolExpectation
```

## Parameters

- `expectations`: The expectations that must all be satisfied.

## Mentioned in

Evaluating tool-calling behavior

## Discussion

Discussion Only valid within the ordered array of a TrajectoryExpectation.
