# E4013

This function has a type which expects a different number of arguments than provided.

## Erroneous Example

```{literalinclude} /sources/error_codes/4013_error/top.mbt
:language: moonbit
```

The example above declares a function `f` returns a function which expects no
arguments, but returns a function that expects one argument. This will give the
following error on line 2:

```
This function has type () -> Int, which expects 0 argument(s), but is given 1 argument(s).
```

## Suggestion

Adjust the code so that the number of arguments in the function type matches the number
of arguments in the function definition:

```{literalinclude} /sources/error_codes/4013_fixed/top.mbt
:language: moonbit
```

... or:

```{literalinclude} /sources/error_codes/4013_fixed/top_1.mbt
:language: moonbit
```
