# Data structures

- [List](https://www.agentica-lang.com/agentica/library/data-structures/list/index.md): values of one type, in order. Walk, sort, map, select.
- [Map](https://www.agentica-lang.com/agentica/library/data-structures/map/index.md): find a value by key (`Int`, `String` or `Bytes`), in insertion order. Lookups and counters.
- [Set](https://www.agentica-lang.com/agentica/library/data-structures/set/index.md): each `Int`, `String` or `Bytes` once, in first-added order. Duplicates and membership.
- [Queue](https://www.agentica-lang.com/agentica/library/data-structures/queue/index.md) (`std/queue`): first in, first out, of strings.
- [Heap](https://www.agentica-lang.com/agentica/library/data-structures/heap/index.md) (`std/heap`): a priority queue of any type; `pop` gives the first value in your order.
- [Range](https://www.agentica-lang.com/agentica/library/data-structures/range/index.md): `0...n` counts without a list. Use it in `for`.
- [Bytes](https://www.agentica-lang.com/agentica/library/data-structures/bytes/index.md): a compact immutable byte string, for digests, file contents and wire formats. Slice, join, compare.
- [Lazy](https://www.agentica-lang.com/agentica/library/data-structures/lazy/index.md): a recipe of steps over a list, a range or an endless source, run one item at a time.
- [Optional](https://www.agentica-lang.com/agentica/library/data-structures/optional/index.md): `some(value)` or `none`, for a value that may be missing.
- [Structs](https://www.agentica-lang.com/agentica/tour/structs/index.md) and [enums](https://www.agentica-lang.com/agentica/tour/enums-and-case/index.md): fixed named fields, or named cases.

All values are immutable. New to these? Read the tour pages [Lists](https://www.agentica-lang.com/agentica/tour/lists/index.md) and [Maps](https://www.agentica-lang.com/agentica/tour/maps/index.md) first.

## Pages in this section

- [List](https://www.agentica-lang.com/agentica/library/data-structures/list/index.md): Functions for List[T]. Each one is also a method on lists.
- [Map](https://www.agentica-lang.com/agentica/library/data-structures/map/index.md): Functions for Map[K, V]. Each one is also a method on maps.
- [Set](https://www.agentica-lang.com/agentica/library/data-structures/set/index.md): Functions for Set[T], a collection of distinct Int, String or Bytes values. Each one is also a method on sets.
- [Heap (std)](https://www.agentica-lang.com/agentica/library/data-structures/heap/index.md): The std/heap module, a priority queue of any type in the order you give.
- [Queue (std)](https://www.agentica-lang.com/agentica/library/data-structures/queue/index.md): The std/queue module, a first-in, first-out queue of strings.
- [Range](https://www.agentica-lang.com/agentica/library/data-structures/range/index.md): Ranges of Int values, and the Int loop methods times, upto and downto.
- [Lazy](https://www.agentica-lang.com/agentica/library/data-structures/lazy/index.md): Lazy pipelines over lists, ranges, endless sources, files and channels, run one item at a time by a terminal, with try in the blocks and a terminal that writes a file.
- [Bytes](https://www.agentica-lang.com/agentica/library/data-structures/bytes/index.md): Bytes, a compact immutable byte string, and the methods that read, cut, join and build it.
- [Optional](https://www.agentica-lang.com/agentica/library/data-structures/optional/index.md): A value that may be missing, with some and none.
