---
title: "15.8 Recap and reference"
url: https://una-lang.org/en/learn/concurrency/recap-and-reference/
release: v0.4.0
edition: "0.2"
---

# 15.8 Recap and reference

## 15.8.1 For agents

:::agents
`una --json check .` prints each diagnostic of this chapter with its `code`, `message` and `primary` span; none carries a repair edit, so the document reports `"fixable":0`, and `una fix` changes nothing. U2023 marks the outer name a task assigns; U2024 marks `together`, with each line of the block that is not a `let`; U0101 marks `together` or `together for` where it stands; U0103 marks `async` or `await`. In `una --json test .`, an example's `trace` lists the events of a block's tasks in task order, each event with its task's path in `task`. The compact rule: *a `together` block or a `together for` gives the result of running its tasks one after another, in order, stopping at the first failure; a task reads outer names and never assigns them.*
:::

## 15.8.2 Recap

:::recap
- `together` with two or more `let` branches runs them as tasks, and binds their names after the block, in order.
- A branch sees the names bound before the block, never its siblings, and keeps its own clause.
- `together for x in xs` runs one task per element and gives their values in list order.
- `together` is a statement; `together for` is a value: after `let`, in an assignment, or last in a block.
- A task never assigns an outer name (U2023): return a value, and combine the list after the block.
- The first failure in order wins; later tasks are canceled, earlier ones run on.
- Effects are recorded in task order, but printed lines may appear in any order: print after the block.
:::

## 15.8.3 Reference

:::reference
- Construct pages: [`together`](https://una-lang.org/en/docs/language/control-flow/together/), [`for`](https://una-lang.org/en/docs/language/control-flow/for/), [`let edit`](https://una-lang.org/en/docs/language/control-flow/let-edit/), [`if error`](https://una-lang.org/en/docs/language/errors/if-error/), [`uses`](https://una-lang.org/en/docs/language/capabilities/uses/), [`example`](https://una-lang.org/en/docs/language/examples/example/)
- Commands: [`una run`](https://una-lang.org/en/docs/cli/run/), [`una test`](https://una-lang.org/en/docs/cli/test/), [`una build`](https://una-lang.org/en/docs/cli/build/)
- Diagnostics: [U0101](https://una-lang.org/en/docs/errors/U0101/), [U0103](https://una-lang.org/en/docs/errors/U0103/), [U1001](https://una-lang.org/en/docs/errors/U1001/), [U2023](https://una-lang.org/en/docs/errors/U2023/), [U2024](https://una-lang.org/en/docs/errors/U2024/), [U3007](https://una-lang.org/en/docs/errors/U3007/)
- Specification: [structured concurrency](https://una-lang.org/en/docs/spec/19-structured-concurrency/), [dynamic semantics](https://una-lang.org/en/docs/spec/11-dynamic-semantics/), [the native backend](https://una-lang.org/en/docs/spec/16-native-backend/), [capabilities and effects](https://una-lang.org/en/docs/spec/05-capabilities-and-effects/), [errors](https://una-lang.org/en/docs/spec/06-errors/)
:::
