diff --git a/content/reference.md b/content/reference.md index 4fd259f..7c442b3 100644 --- a/content/reference.md +++ b/content/reference.md @@ -4851,7 +4851,7 @@ For example, the following expressions are equivalent. ### Types -#### HashMap [TYPE] · src +#### HashMap [TYPE] · src - (HashMap (HmNode :A :B)) Immutable map (also known as a dictionary or dict) using hashes. Implemented as a hash array mapped trie data structure. @@ -4876,7 +4876,7 @@ Immutable map (also known as a dictionary or dict) using hashes. Implemented as ### Values -#### (ADJOIN HM KEY VAL) [FUNCTION] · src +#### (ADJOIN HM KEY VAL) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → :A → :B → (HashMap :A :B)) Returns a hashmap that has a new entry of (`key`, `val`) added to `hm`. @@ -4886,7 +4886,7 @@ If `hm` alreay contains an entry with `key`, however, `hm` is returned as is. *** -#### (COUNT HM) [FUNCTION] · src +#### (COUNT HM) [FUNCTION] · src ∀ :A :B. ((HashMap :A :B) → Integer) Returns the number of entries in HM. @@ -4895,7 +4895,7 @@ Returns the number of entries in HM. *** -#### (DIFFERENCE A B) [FUNCTION] · src +#### (DIFFERENCE A B) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → (HashMap :A :B) → (HashMap :A :B)) Raturns a HashMap that contains mappings in `a` but not in `b`. @@ -4904,7 +4904,7 @@ Raturns a HashMap that contains mappings in `a` but not in `b`. *** -#### (EMPTY? HM) [FUNCTION] · src +#### (EMPTY? HM) [FUNCTION] · src ∀ :A :B. ((HashMap :A :B) → Boolean) Returns True if a hashmap HM is empty, False if not. @@ -4913,7 +4913,7 @@ Returns True if a hashmap HM is empty, False if not. *** -#### (ENTRIES HM) [FUNCTION] · src +#### (ENTRIES HM) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → (Iterator (Tuple :A :B))) Returns an interator to iterate over all entries in hashmap hm. @@ -4922,7 +4922,7 @@ Returns an interator to iterate over all entries in hashmap hm. *** -#### (INSERT HM KEY VAL) [FUNCTION] · src +#### (INSERT HM KEY VAL) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → :A → :B → (HashMap :A :B)) Returns a hashmap that has a new entry of (KEY, VAL) added to HM. If HM @@ -4932,7 +4932,7 @@ contains an entry with KEY, the new hashmap replaces it for the new entry. *** -#### (INTERSECTION A B) [FUNCTION] · src +#### (INTERSECTION A B) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → (HashMap :A :B) → (HashMap :A :B)) Construct a HashMap containing all the mappings whose key is in both A and B. @@ -4943,7 +4943,7 @@ The entries from A remains in the result. *** -#### (KEYS HM) [FUNCTION] · src +#### (KEYS HM) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → (Iterator :A)) Returns an interator to iterate over all the keys in a hashmap hm. @@ -4952,7 +4952,7 @@ Returns an interator to iterate over all the keys in a hashmap hm. *** -#### (LOOKUP HM KEY) [FUNCTION] · src +#### (LOOKUP HM KEY) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → :A → (Optional :B)) Returns a value associated with KEY in the hashmap HM. @@ -4961,7 +4961,7 @@ Returns a value associated with KEY in the hashmap HM. *** -#### (REMOVE HM KEY) [FUNCTION] · src +#### (REMOVE HM KEY) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → :A → (HashMap :A :B)) Returns a hashmap that is identical to HM except the entry with KEY is @@ -4971,7 +4971,7 @@ removed. If HM does not contain an entry with KEY, HM is returned as is. *** -#### (REPLACE HM KEY VAL) [FUNCTION] · src +#### (REPLACE HM KEY VAL) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → :A → :B → (HashMap :A :B)) Returns a hashmap where the value associated with `key` is replaced @@ -4982,7 +4982,7 @@ with `val`. If `hm` does not contain an entry with `key`, `hm` is *** -#### (UNION A B) [FUNCTION] · src +#### (UNION A B) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → (HashMap :A :B) → (HashMap :A :B)) Construct a HashMap containing all the mappings from A and B. @@ -4995,13 +4995,13 @@ The operation is associative, but not commutative. *** -#### (UPDATE HM KEY F) [FUNCTION] · src +#### (UPDATE HM KEY F) [FUNCTION] · src ∀ :A :B :C. Hash :A ⇒ ((HashMap :A :B) → :A → ((Optional :B) → (Tuple (Optional :B) :C)) → (Tuple (HashMap :A :B) :C)) *** -#### (VALUES HM) [FUNCTION] · src +#### (VALUES HM) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → (Iterator :B)) Returns an interator to iterate over all the values in a hashmap hm. @@ -5010,7 +5010,7 @@ Returns an interator to iterate over all the values in a hashmap hm. *** -#### (XOR A B) [FUNCTION] · src +#### (XOR A B) [FUNCTION] · src ∀ :A :B. Hash :A ⇒ ((HashMap :A :B) → (HashMap :A :B) → (HashMap :A :B)) Raturns a HashMap that contains mappings either in `a` or in `b`, @@ -5020,7 +5020,7 @@ but not in both. *** -#### EMPTY [VALUE] · src +#### EMPTY [VALUE] · src ∀ :A :B. (HashMap :A :B) An empty HashMap