Example

Variable

Example 1.

Define a variable without assignment.

// "@" <ID>

@(x)

Example 2.

Define multiple variables without assignment.

// "@" "(" [<ID> ["," <ID>]*]? ")"

@(x, y)

Function

Example 1.

Define a function without arguments.

// <ID> ":=" <DOMAIN>

f := { ... }

Example 2.

Define a function with multiple arguments.

// [<VAR_DEF>]? [">>"]? <ID> ":=" <DOMAIN>

@(x, y) >> f := { ... }

Example 3.

Define an anonymous function with multiple arguments.

// [<VAR_DEF>]? [">>"]? <DOMAIN>

@(x, y) >> { x + y }

Module

@(
  "query",
) >> main := {
  ...
}

Last updated