> For the complete documentation index, see [llms.txt](https://fluence.gitbook.io/aqua-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fluence.gitbook.io/aqua-book/language.md).

# Language

Aqua is a language for distributed workflow coordination in p2p networks.

It's structured with significant indentation.

```haskell
-- Comments begin with double-dash and end with the line (inline)
func foo(): -- Comments are allowed almost everywhere
  -- Body of the block expression is indented
  bar(5)
```

Values in Aqua have types, which are designated by a colon, `:`, as seen in the function signature below. The type of a return, which is yielded when a function is executed, is denoted by an arrow pointing to the right `->` , whereas yielding is denoted by an arrow pointing to the left `<-`.

```haskell
-- Define a function that yields a string
func bar(arg: i16) -> string:
  -- Call a function
  smth(arg)

  -- Yield a value from a function
  x <- smth(arg)

  -- Return a yielded results from a function
  <- "return literal"
```

Subsequent sections explain the main parts of Aqua.

Data:

* [Types](/aqua-book/language/types.md)
* [Values of that types](/aqua-book/language/variables.md)

Execution:

* [Topology](/aqua-book/language/topology.md) – how to express where the code should be executed
* [Execution flow](/aqua-book/language/flow.md) – control structures

Computations:

* [Abilities & Services](/aqua-book/language/abilities-and-services.md)

Advanced parallelism:

* [CRDT Streams](/aqua-book/language/crdt-streams.md)

Code management:

* [Imports & exports](/aqua-book/language/header.md)

Reference:

* [Expressions](/aqua-book/language/expressions.md)
