# Runes

Runes are special symbols or characters that serve as syntactic markers for various language constructs and operations. Runes are a key part of flexible syntax system that is used by Sire, known as Rex (R-expressions), which allows for multiple ways to express the same code structure.

Runes in Sire serve several purposes:

1. **Function Definition and Application**: Runes like `=` for defining functions and `|` for function application are fundamental to Sire's syntax.
2. **Control Flow**: Runes such as `?` for creating anonymous functions or `#datacase` for pattern matching help control the flow of execution.
3. **Metaprogramming**: Some runes, like `^` for expression reordering or `'` for quoting are used in metaprogramming.
4. **Syntactic Sugar**: Runes like `:` for continuation passing style or `-` for infix function application provide convenient shorthand notations.

Runes are one or more non-alphanumeric characters and are used at the beginning of expressions or in specific syntactic positions. They allow Sire to have a highly expressive and flexible syntax while maintaining a simple, uniform structure that's easy to parse and manipulate programmatically.

### Runes

* `|`     function application (can be omitted in nested forms: `(| f a)` is equal to `(f a)`)
* `-`     function application&#x20;
* `=`     top-level defintion&#x20;
* `@`     let-binding&#x20;
* `&`     anonymous lambda&#x20;
* `?`     named lambda&#x20;
* `??`  named and pinned lambda&#x20;
* `,`     tuples&#x20;
* `:|`   imports&#x20;
* `####` dependency
* `*`     list of expressions (advanced - this can be used to circumvent the need for indentation)

### Macros

* `[]`    short form for `,`&#x20;
* `^`      expression reordering ("anonymous where": `(^ f _ b)(expr)` gets rewritten to `(@ _ expr | f _ b))`
* `:`     continuation passing


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://opfn.gitbook.io/pallas/sire-reference/runes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
