Skip to content

01 · Hello & Comments

Hello, World!

The smallest runnable Zolo program: print, functions, and the pipe.

On this page

Every Zolo program is a sequence of statements executed top to bottom. print writes a line to standard output:

A first program: a const, a function with an annotated return type, and the pipe operator |> feeding a value into a call.

00-hello.zolo
Playground
const test1 = 2

/// Multiplies two integers and returns the result.
fn mul(a: int, b: int) -> int {
  return a * b
}

let result = test1 |> mul(2)
print("Hello from Zolo!")
print("2 * 2 = {result}")

See also

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en