Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

function

A named block of code you can call with arguments.

A function (fn) takes typed parameters and returns a value of its declared return type.

Loading interactive…

Examples

  • fn pay(hours: u32, rate: u32) -> u32 { hours * rate } called as pay(4, 15) returns 60.

Read the full section →