> For the complete documentation index, see [llms.txt](https://docs.cheddar.vihan.org/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheddar.vihan.org/docs/control-flow/loops.md). Agents can also search and read this documentation through its [MCP server](https://docs.cheddar.vihan.org/docs/~gitbook/mcp).

# Loops

Loops are the most common way to repeat a task. Additionally sometimes recursion maybe better suited for your needs. Loops are more efficient to the fact their execution is allocated once, and is only re-executed. This is compared to recursion which requires the scope to be reconstructed.
