weft
docs
cookbook
playground
download
registry
source
Run
examples...
Hello world
Fibonacci
HTTP client
Enums & match
Concurrency
Error handling
Closures
Pipeline
Share
fn main { say("hello, weft!") nums := [1, 2, 3, 4, 5] squares := map(nums, fn(x) { x * x }) say("squares: $squares") result := add(2, 3) say("2 + 3 = $result") } fn add(a, b) { a + b }
output
press Run or Ctrl+Enter to execute