marqdo

02-functionok

structure/02-function.mq.md

Structure

fn · h1main
comment

Use # / ## for functions. Parameters are bare - name lines under the heading.

comment

Call with > and named args param=value:

call> greet who=World
fn · h2greet
who
call> print text=Hello `who`!
Functions
Variables

No bindings

Execution

Hello World!

Source

---
title: Functions and named calls
description: `#` defines functions; `>` calls; `-` lists parameter names
---

# main

Use `#` / `##` for functions. Parameters are bare `- name` lines under the heading.

Call with `>` and named args `param=value`:

> greet who=World

## greet
    + `who`

> print text=Hello `who`!

Variable