# Immutable collections

Here is a brief overview of the basic Rimbu TypeScript immutable collection types. Many of these types have multiple concrete implementations, see the corresponding links for more information:

## Single-typed base collections

Name | Description |
---|---|

`Stream<T>` | an Iterable-like structure that represents a source that can produce values of type T when requested |

`List<T>` | an immutable ordered sequence of elements of type T that can be manipulated and accessed randomly in a relatively efficient way |

`RSet<T>` | a Set collection with values of type T, where the collection does not contain duplicate values |

`MultiSet<T>` | a Set-like structure where each unique element of type T can be added multiple times, and its count is stored |

`Graph<N>` | a collection of nodes of type N that can be connected through edges |

## Two-typed base collections

Name | Description |
---|---|

`RMap<K, V>` | a Map collection with entries containing keys of type K and values of type V. Each key has exactly one value, and each key is unique |

`MultiMap<K, V>` | a Map-like structure in which each key of type K has one or more values of type V. For each key, it's associated values are unique |

`BiMap<K, V>` | a bidirectional Map of keys of type K and values of type V, where each key has exactly one value, and each value has exactly one key |

`BiMultiMap<K, V>` | a bidirectional MultiMap of keys of type K and values of type V, where each key-value association also has an inverse value-key association |

`ValuedGraph<N, V>` | a collection of nodes of type N that can be connected through edges with values of type V |

## Three-typed base collections

Name | Description |
---|---|

`Table<R, C, V>` | an immutable 2-dimensional Map, containing row keys of type R and column keys of type C, where a combination of a row and column key can contain one value of type V |