# Module keys1value

- Description
- Data Types
- Function Index
- Function Details

### Keys1Value

Maintain an associative lookup for a list of keys and 1 value.

Copyright © 2014-2020 Michael Truog

Version: 2.0.1 Nov 26 2020 14:52:41 ------------------------------------------------------------------------

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### Keys1Value

Maintain an associative lookup for a list of keys and 1 value. The supplied data structure module must have dict interface functions (unless the module is maps).

## Data Types

### dict_proxy()

`dict_proxy(Key, Value) = dict:dict(Key, Value)`

### key()

`key() = any()`

not a list()

### keys()

`keys() = [key(), ...]`

### keys1value()

`keys1value(Key, Value) = keys1value_dict(Key, Value) | #keys1value{module = module(), lookup = any()}`

### keys1value_dict()

`keys1value_dict(Key, Value) = {keys1value, dict, dict_proxy(Key, {[Key], Value})}`

### value()

`value() = any()`

## Function Index

erase/2 |
fetch/2 |
find/2 |
is_key/2 |
new/0 |
new/1 |
store/3 |
to_list/1 |

## Function Details

### erase/2

`erase(Key::key(), State::keys1value(key(), value())) -> keys1value(key(), value())`

### fetch/2

`fetch(Key::key(), Keys1value::keys1value(key(), value())) -> value()`

### find/2

`find(Key::key(), Keys1value::keys1value(key(), value())) -> {ok, value()} | error`

### is_key/2

`is_key(Key::keys() | key(), Keys1value::keys1value(key(), value())) -> boolean()`

### new/0

`new() -> keys1value_dict(key(), value())`

### new/1

`new(Module::module()) -> keys1value(key(), value())`

### store/3

`store(Keys::keys(), Value::value(), State::keys1value(key(), value())) -> keys1value(key(), value())`

### to_list/1

`to_list(Keys1value::keys1value(key(), value())) -> [{keys(), value()}]`

Generated by EDoc