> For the complete documentation index, see [llms.txt](https://clarity-7.gitbook.io/clarity-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clarity-7.gitbook.io/clarity-docs/clarity-moniversive-invariant-static-mis/education-learn-the-language-.mis/coding-exercises.md).

# Coding exercises

> Generated 2026-07-29T03:15:30Z

## Part I — Reading

1. **Counter module** — From [05 — State, signals, fail](/clarity-docs/clarity-moniversive-invariant-static-mis/education-learn-the-language-.mis/05-state-signals-fail.md), write three paragraphs: what each invariant prevents, what each outcome allows, how signals/fails relate to requires.
2. **Ledger module** — Explain **`supply_constant`** in your own words with a numeric example (mint 100, burn 30).
3. **Router mapping** — Fill a table: teaching outcome → `MisRouter.mis` outcome name.

## Part II — Writing

4. **Scratch counter** — Add outcome `set_max(step: u64)` with requires `step > 0`, constraint updating `max_step`.
5. **Second module** — Create `QueueLesson` with invariants on `queue_size` and outcomes `enqueue` / `dequeue` (constraints only; `_ok` flags allowed).
6. **Rename refactor** — Pick a showcase file; rename one outcome in a scratch copy; update constraints consistently; re-check.

## Part III — Checker

7. Run `bin/misc` on every file in [mis-showcase.md](/clarity-docs/clarity-moniversive-invariant-static-mis/education-learn-the-language-.mis/mis-showcase.md); log pass/fail in a table.
8. Break a file on purpose (delete one semicolon); read the checker message; fix.

## Part IV — Framework

9. **Recursion** — Read `MisRecursion.mis`; write two paragraphs on `bounded_recurse_fold` vs `assert_max_depth`.
10. **Kernel** — Read first 45 lines of `misc.mis`; list outcomes and one sentence each.

Pass: you can author a new 2-outcome module without copying paste errors and check it clean.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://clarity-7.gitbook.io/clarity-docs/clarity-moniversive-invariant-static-mis/education-learn-the-language-.mis/coding-exercises.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
