soma.cell

Functions (handlers)

Functions (handlers), in the reference of the Soma programming language (soma 3.2.4). A block marked ✓ is a whole program that soma check accepts; the others are excerpts.

on add(a: Int, b: Int) {
    return a + b
}

on _private_helper() {
    // underscore prefix = not exposed as HTTP endpoint
    return "internal"
}

// Call: let result = add(1, 2)