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

# Functions

To declare function you should use `fun` keyword:

```kotlin
fun foo() {}
```

You can place `private` before `fun` keyword to make function private so you can't use that function from other module.

### Function type

If you need to declare function type you need use this syntax:

```kotlin
(param_type,*) -> (return_type)
```

Example:

```kotlin
var x: (int,int) -> int = add; 
```
