std/collections
The collections. The traits are what signatures, fields and bindings talk about; an implementation is only named where something is constructed (see "Collections and Iteration" in CONCEPT.md).
Modules
std/collections/flags[Flags]: a set of the cases of a type whose cases stand for powers of two, stored as one bit mask - what a C API, a file format or a protocol means by flags - and [FlagsError], what reading a mask with a bit that belongs to no case answers.std/collections/heapThe priority structure: [Heap], a binary heap over aListthat hands out the item with the smallest key first.std/collections/listThe ordered, indexable sequence: [List], its default implementation [ArrayList], and the trie-backed [TrieList].std/collections/mapKeys mapped to values: [Map], its default implementation [TrieMap], and the flat [HashMap].std/collections/queueFIFO: [Queue], with [ArrayQueue] as its default implementation and [BankersQueue] for a queue kept in many versions.std/collections/setA collection without duplicates: [Set], its default implementation [TrieSet], and the flat [HashSet].std/collections/stackLIFO: [Stack], with [ArrayStack] and the persistent [ConsStack] as its implementations.
Everything
- type
ArrayListContiguous, growable buffer - the default. - type
ArrayQueueRing buffer on top of aList. - type
ArrayStackThe only implementation of [Stack]: aListused from the end. - type
BankersQueueA persistent queue: two cons lists, the front in the orderdequeuehands items out and the rear reversed, so anenqueueis one new node in front of the rear. - type
ConsStackA persistent stack: a cons list of cells, each holding an item and the stack below it. - type
ConsStackIteratorThe cursor over a [ConsStack]: it holds the cell it stands on, which keeps that cell and everything below alive, so a change to the stack while it is iterated is never seen here. - fn
describedKeythe key "Alan": a key as the message of a missing one names it - whatmap[key]panics with. - fn
describedShownKeythe key "Alan"for the text a key shows as, with everything after its 60th character cut off as.... - type
FlagsA set of the cases ofCase, one bit each, with the words a [Set] has:contains,insertandinserted,removeandremoved,Flags.union,Flags.intersectionandFlags.difference. - extend
Flags<Case> with Show{Read, Write}- braces, as a set shows. - type
FlagsErrorA mask with a bit that belongs to no case: what [Flags.fromBits] answers for it. - type
FlagsIteratorThe cursor of [Flags]: the next bit that is set, as its case. - type
HashMapFlat hash table: the fastest lookups and writes, but a write to a shared table copies all of it. - type
HashSetFlat hash table: the fastest lookups and writes, but a write to a shared table copies all of it. - type
HeapA heap:removeSmallesttakes out the item whose key is the smallest,peekSmallestlooks at it. - trait
ListAn ordered sequence, addressable by index. - extend
List<Item> with From<Iterate<Item>>The factory picks the default implementation. - extend
List<Item> with Show[1, 2, 3], and[]when it is empty - the format of the literal. - extend
List<Item> with EqualsEqual when they have the same length and equal items in the same order. - extend
List<Item> with HashOrder-dependent, unlike [Set.hash] and [Map.hash]: two lists with the same items in a different order differ. - trait
MapMapping from keys to values. - extend
Map<Key, Value> with From<Iterate<(Key, Value)>>The factory picks the default implementation. - extend
Map<Key, Value> with Show["a": 1, "b": 2], and[:]when it is empty - the format of the literal. - extend
Map<Key, Value> with EqualsEqual when they hold the same entries, regardless of insertion order. - extend
Map<Key, Value> with HashOrder-independent, unlike [List.hash]: entries are combined withbitwiseExclusiveOr, so insertion order never changes the hash of equal maps. - trait
QueueFIFO queue. - extend
Queue<Item> with From<Iterate<Item>>The factory picks the default implementation: whatQueue.ofand a pipeline'sto<Queue<Item>>()build. - extend
Queue<Item> with EqualsEqual when they hold the same items in the same order, which for a queue is the order ofdequeue. - extend
Queue<Item> with HashOrder-dependent, like [List.hash] and unlike [Set.hash]: two queues with the same items in a different order are not equal, so they need not hash alike. - type
RingListAListwith O(1) work at both ends: a ring buffer of slots, the technique of [ArrayQueue], behind the wholeListvocabulary. - trait
SetCollection without duplicates. - extend
Set<Item> with From<Iterate<Item>>The factory picks the default implementation. - extend
Set<Item> with Show{a, b}- braces, so a set is never mistaken for a list. - extend
Set<Item> with EqualsEqual when they hold the same items, regardless of insertion order. - extend
Set<Item> with HashOrder-independent, unlike [List.hash]: entries are combined withbitwiseExclusiveOr, so insertion order never changes the hash of equal sets. - trait
StackLIFO stack. - extend
Stack<Item> with From<Iterate<Item>>The factory picks the default implementation: whatStack.ofand a pipeline'sto<Stack<Item>>()build. - extend
Stack<Item> with EqualsEqual when they hold the same items in the same order, which for a stack is from the top down - the order it iterates in, and the only order a reader of one can see. - extend
Stack<Item> with HashOrder-dependent, like [List.hash] and unlike [Set.hash]: two stacks with the same items in a different order are not equal, so they need not hash alike. - type
TrieListBit-partitioned trie. - type
TrieMapHash array mapped trie - the default. - type
TrieSetHash array mapped trie - the default. - extend
UInt64 with From<Flags<Case>>The mask of the flags: the way out of the pair a value is encoded through.