---
title: "Entry"
url: https://una-lang.org/en/docs/std/prelude/Entry/
release: v0.4.0
edition: "0.2 and later"
source: https://github.com/una-lang/una/blob/v0.4.0/docs/std/listing.json
---

# Entry

A kind of the prelude, in scope in every module. Edition 0.2 and later.

```una
pub kind Entry[K, V]
  key: K
  value: V
```

An entry of a map, as `entries()` lists them (`spec/21 §1` rule 4).

## Fields

- `key`: the key
- `value`: the value at that key

## See also

[`entries`](https://una-lang.org/en/docs/std/builtin/entries/)

## Example

`src/shop.una`

```una
module shop

--- One line of a stock report.
line(e: Entry[Text, Int]) -> Text = "{e.key}: {e.value}"

pub main() -> Unit
  uses @console: Console[print]
=
  let stock = empty_map().with(key: "lamp", value: 3).with(key: "desk", value: 1)
  for e in stock.entries()
    @console.print(line(e))
```

`una run .` prints:

```text
desk: 1
lamp: 3
```

## Specification

- [`spec/21 §1`](https://una-lang.org/en/docs/spec/21-maps/#s1)

Generated from the standard modules of una v0.4.0 ([`docs/std/listing.json`](https://github.com/una-lang/una/blob/5fec93d88932b333feec25e589355a2cb34c37b5/docs/std/listing.json), which is not part of the specification). The specification governs: [`spec/14 §1`](https://una-lang.org/en/docs/spec/14-standard-library/#s1).
