struct Dict<Value>A string-keyed dictionary over region-allocated ('heap) nodes. Insertion prepends in O(1), duplicate keys shadow older entries, and lookup is linear.
Properties
Methods
mut func insert(consume key: String, consume value: Value) -> Void
Prepends an entry; an existing equal key remains stored but is shadowed.
View Source
pub mut func insert(consume key: String, consume value: Value) -> Void {
self.head = Optional.some(DictNode(key: key, value: value, next: self.head))
self.count = self.count + 1
}