---
title: "U3017: `of` clause that names no parameter"
url: https://una-lang.org/en/docs/errors/U3017/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U3017.md
---

# U3017: `of` clause that names no parameter

In edition 0.2, a function header can write `uses of p` and `fails of p`: the function performs the effects, and passes the failures, of whatever function its parameter `p` receives (ADR 0062, `spec/05 §9` rule 9). `p` MUST be one of the function's own parameters. A name that is no parameter, often a typo or a parameter renamed later, is U3017 at the name in the clause.

## The repair at a glance

`src/demo.una`

```diff
  module demo

  pub apply_all(xs: List[Int], each: fn(Int) -> Unit) -> Unit
-   uses of action
+   uses of each
  =
    for x in xs
      each(x)
```

## Failing example

`una.toml`

```toml
[package]
name = "demo"
version = "0.1.0"
edition = "0.2"
```

`src/demo.una`

```una
module demo

pub apply_all(xs: List[Int], each: fn(Int) -> Unit) -> Unit
  uses of action
=
  for x in xs
    each(x)
```

## Fixed example

`una.toml`

```toml
[package]
name = "demo"
version = "0.1.0"
edition = "0.2"
```

`src/demo.una`

```una
module demo

pub apply_all(xs: List[Int], each: fn(Int) -> Unit) -> Unit
  uses of each
=
  for x in xs
    each(x)
```
