> For the complete documentation index, see [llms.txt](https://todepond.gitbook.io/spacetode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://todepond.gitbook.io/spacetode/transformations.md).

# Transformations

You can make rules symmetrical in various ways. These keywords transform rules to achieve this.

## Any

The `any` keyword randomly transforms rules in specified symmetry:

```
any(x) {
    @_ => _@
}
```

The above rule has a `x` symmetry. It will randomly reflect itself in the x-axis.\
In other words, it might move right, or it might move left.

## For

The `for` keyword loops through all transformations of a symmetry (in a random order):

```
for(xy) {
    @_ => @@
}
```

The above rule will loop through all possible transformations of `xy` in a random order, until it finds a match.

## All

The `all` keyword works similarly to the `for` keyword, but it doesn't randomise the order of transformations.

```
all(xyz.directions) {
    @_ => @@
}
```
