<aside> 💡 Owner: @Łukasz Czerwiński


Language description

// TODO in documentation:

A complete example

ask(arg1:int):string {
	const factorial = fun(n:int):int {
	  if (n:lessThan(2)) {
	    return n

  const sum:int(int, int) = fun(a:int, b:int):int {
	const one = 1
	sum(one, arg1:factorial):toString

The result of the query above is 1 + arg1! (one plus factorial of arg1)


Query structure

The whole code is enclosed in an ask block:

ask {
	... // here comes the whole code

Query arguments

The ask block might have a list of arguments, which defines the input data for the query.

The list of arguments is comma separated, each of them in format: <name>:<type>, similar to functions (see below).

ask(maxAge:int, userName:string) {

When no arguments, no empty braces are required:

ask {
// is equivalent to:
ask() {
ask:string {
// is equivalent to:
ask():string {