> For the complete documentation index, see [llms.txt](https://glados.guillaume-hein.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glados.guillaume-hein.fr/features/prototypes.md).

# Prototypes

GoMelan supports prototypes, like in C, when you have to use a function that is declare under the use calling function, you have to declare it above. If you do not, the script will not compile.

```php
fn power(x: Int, y: Int) -> Int;

fn main() -> Int
{
    total: Float = 3.4;
    a: [Int] = [1, 3, -4, 2, 0, 6, -6];

    return power(floatToInt(total) + sum(a), 3);
}

fn power(x: Int, y: Int) -> Int
{
    if (x == 0) {
         return 0;
    }
    if (y < 0) {
        return (power(x, y – 1) / x);
    }
    return (power(x, y – 1) * x);
}

```

**Output:**

```
2197
```

1. Declare the main function.
2. Declare the power function.
3. Paste the prototype above the main function.
