# E4203

Compiler diagnostic name: `constr_as_function`.

MoonBit does not allow constructors to be passed directly as higher-order
functions. A constructor may still be called normally, but when a function value
is required, wrap the constructor call in a lambda so the argument flow is
explicit.

## Erroneous example

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

## Suggestion

Use a lambda that calls the constructor.

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