> For the complete documentation index, see [llms.txt](https://quarkdown.com/wiki/llms.txt).

# Iterable

Iterable values are ordered lists or unordered sets that you can iterate through with a [loop](loops.md).

Iterables can also be destructured. See [*Destructuring*](destructuring.md) for more information.

## Collection

An ordered or unordered Markdown list is automatically converted to an ordered collection.

> **Example 1**
> 
> ```markdown
> .var {letters}
>     - A
>     - B
>     - C
> 
> .foreach {.letters}
>     .1::lowercase
> ```
> 
> a
> 
> b
> 
> c

Nested collections can be represented by nested Markdown lists as well.

> **Example 2**
> 
> ```markdown
> .var {letters}
>     - - A
>       - B
>     - - C
>       - D
>     - - E
>       - F
> 
> .foreach {.letters}
>     .1::first
> ```
> 
> A
> 
> C
> 
> E

## Pair

A pair is an iterable of two values.

You can create a pair via **`.pair {first} {second}`** or retrieve one as a [Dictionary](dictionary.md) entry.

## Dictionary

When used in a function that requires an iterable, a [Dictionary](dictionary.md) value is treated as a list of key-value pairs.

## Range

An integer [`Range`](range.md) is a valid ordered iterable value.

## Operations

Assuming `myiterable` is an iterable, you can access useful operations such as `getat`, `sorted`, `average`, and many more via [function call chaining](syntax-of-a-function-call.md#chaining-calls) as `.myiterable::operation`.

For a complete list of operations, refer to the standard library’s [`Collection` documentation](https://quarkdown.com/docs/quarkdown-stdlib/com.quarkdown.stdlib.module.Collection).