HEXOLANGGitHub ↗

Functions

Function declarations, parameters, return types and calls.

Functions are declared with fn. Optional return types are written after ->. Functions can be stored in variables and passed around as values.

hexo
fn greet(string name) -> string {
    return "Hello, " + name;
}

print(greet("World"));
Last updated 2026-11-21Suggest an edit ↗