Functions

Functions use fn, typed parameters, and a return type.

code
fn greet(name: String) -> String:
  "Hello " <> name

The last expression is the return value.

code
fn double(value: Int) -> Int:
  value * 2

Public functions use pub fn.

code
pub fn main() -> Nil:
  echo greet("Donna")

Donna uses indentation for blocks. No braces. No extra ceremony.

Small functions are a good Donna habit. Give the thing a name, make the type clear, move on.