Odin Notes and Examples
(top-level)

Procedures

If you’re particular about names:

“Procedure” in a general term that covers both, and that’s what Odin uses. Ex.:

package my_pkg

import "core:fmt"

main :: proc() {
    n, m := 2, 3
    ans := foo(n, m)
    fmt.println(ans)
}

foo :: proc(num_1: int, num_2: int) -> int {
    return num_1 + num_2
}