.docname {Iterable}
.include {docs}

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

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

## Collection

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

.examplemirror
    .var {letters}
        - A
        - B
        - C

    .foreach {.letters}
        .1::lowercase

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

.examplemirror
    .var {letters}
        - - A
          - B
        - - C
          - D
        - - E
          - F

    .foreach {.letters}
        .1::first

## 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.qd) entry.

## Dictionary

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

## Range

An integer [`Range`](range.qd) 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.qd#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).
