Docs Menu

Welcome

Function Definition

Define a function using the fn keyword.

drylang
fn greet(name) {
    pt("Hello, " + name + "!")
}

greet("Zaky")

Returning Values

Use rev to return a value from a function.

drylang
fn add(a, b) {
    rev a + b
}

result = add(10, 20)
pt(result) // 30

Async Functions

Use asn fn to declare an async function, and awt to await it.

drylang
asn fn fetchData() {
    rev req("https://api.example.com")
}

data = awt fetchData()