Blyx v0.1.0-alpha is here! Read the release notes ->

Chapter 4

Functions & Closures

Functions are pervasive in Blyx code. The fn keyword allows you to declare new functions with parameter type annotations and explicit return signatures.

fn add(a: i32, b: i32) -> i32 {
    a + b
}
← Previous
Common Concepts
Next →
Ownership & Memory