- WhenMissing <in K, in A, out B>
- WhenMatched <in K, in A, in B, out C>
- Map <K, V>
- Map (IEnumerable<(K Key, V Value)> items)
- Map (IEnumerable<(K Key, V Value)> items, bool tryAdd)
- Case
- item (K key)
- itemOrNone (K key)
- map <B> (Lens<V, B> lens)
- this []
- IsEmpty
- Count
- Length
- Add (K key, V value)
- TryAdd (K key, V value)
- TryAdd (K key, V value, Func<Map<K, V>, V, Map<K, V>> Fail)
- AddRange (IEnumerable<Tuple<K, V>> range)
- AddRange (IEnumerable<(K, V)> range)
- TryAddRange (IEnumerable<Tuple<K, V>> range)
- TryAddRange (IEnumerable<(K, V)> range)
- TryAddRange (IEnumerable<KeyValuePair<K, V>> range)
- AddOrUpdateRange (IEnumerable<Tuple<K, V>> range)
- AddOrUpdateRange (IEnumerable<(K, V)> range)
- AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range)
- Remove (K key)
- Find (K key)
- FindSeq (K key)
- Find <R> (K key, Func<V, R> Some, Func<R> None)
- FindPredecessor (K key)
- FindExactOrPredecessor (K key)
- FindSuccessor (K key)
- FindExactOrSuccessor (K key)
- FindOrAdd (K key, Func<V> None)
- FindOrAdd (K key, V value)
- FindOrMaybeAdd (K key, Func<Option<V>> None)
- FindOrMaybeAdd (K key, Option<V> None)
- SetItem (K key, V value)
- SetItem (K key, Func<V, V> Some)
- TrySetItem (K key, V value)
- TrySetItem (K key, Func<V, V> Some)
- TrySetItem (K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None)
- AddOrUpdate (K key, V value)
- AddOrUpdate (K key, Func<V, V> Some, Func<V> None)
- AddOrUpdate (K key, Func<V, V> Some, V None)
- FindRange (K keyFrom, K keyTo)
- FindRangePairs (K keyFrom, K keyTo)
- Skip (int amount)
- ContainsKey (K key)
- Contains (K key, V value)
- Clear ()
- AddRange (IEnumerable<KeyValuePair<K, V>> pairs)
- SetItems (IEnumerable<KeyValuePair<K, V>> items)
- SetItems (IEnumerable<Tuple<K, V>> items)
- SetItems (IEnumerable<(K, V)> items)
- TrySetItems (IEnumerable<KeyValuePair<K, V>> items)
- TrySetItems (IEnumerable<Tuple<K, V>> items)
- TrySetItems (IEnumerable<(K, V)> items)
- TrySetItems (IEnumerable<K> keys, Func<V, V> Some)
- RemoveRange (IEnumerable<K> keys)
- Contains (KeyValuePair<K, V> pair)
- Keys
- Values
- ToDictionary ()
- ToDictionary <KR, VR> (Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector)
- ToReadOnlyDictionary ()
- Tuples
- Pairs
- ValueTuples
- GetEnumerator ()
- ToSeq ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- AsEnumerable ()
- Empty = new Map<K, V>(MapInternal<OrdDefault<K>, K, V>.Empty)
- == (Map<K, V> lhs, Map<K, V> rhs)
- != (Map<K, V> lhs, Map<K, V> rhs)
- < (Map<K, V> lhs, Map<K, V> rhs)
- <= (Map<K, V> lhs, Map<K, V> rhs)
- > (Map<K, V> lhs, Map<K, V> rhs)
- >= (Map<K, V> lhs, Map<K, V> rhs)
- + (Map<K, V> lhs, Map<K, V> rhs)
- - (Map<K, V> lhs, Map<K, V> rhs)
- Equals (object obj)
- Equals (Map<K, V> y)
- Equals <EqV> (Map<K, V> y)
- EqualsKeys (Map<K, V> y)
- GetHashCode ()
- CompareTo (object obj)
- Do (Action<V> f)
- Select <U> (Func<V, U> mapper)
- Select <U> (Func<K, V, U> mapper)
- Where (Func<V, bool> valuePred)
- Where (Func<K, V, bool> keyValuePred)
- Filter (Func<V, bool> valuePred)
- Filter (Func<K, V, bool> keyValuePred)
- ForAll (Func<K, V, bool> pred)
- ForAll (Func<Tuple<K, V>, bool> pred)
- ForAll (Func<(K Key, V Value), bool> pred)
- ForAll (Func<KeyValuePair<K, V>, bool> pred)
- ForAll (Func<V, bool> pred)
- Exists (Func<K, V, bool> pred)
- Exists (Func<Tuple<K, V>, bool> pred)
- Exists (Func<(K, V), bool> pred)
- Exists (Func<KeyValuePair<K, V>, bool> pred)
- Exists (Func<V, bool> pred)
- Iter (Action<K, V> action)
- Iter (Action<V> action)
- Iter (Action<Tuple<K, V>> action)
- Iter (Action<(K, V)> action)
- Iter (Action<KeyValuePair<K, V>> action)
- Choose <U> (Func<K, V, Option<U>> selector)
- Choose <U> (Func<V, Option<U>> selector)
- Fold <S> (S state, Func<S, K, V, S> folder)
- Fold <S> (S state, Func<S, V, S> folder)
- Union (Map<K, V> other, WhenMatched<K, V, V, V> Merge)
- Union <V2> (Map<K, V2> other, WhenMissing<K, V2, V> MapRight, WhenMatched<K, V, V2, V> Merge)
- Union <V2> (Map<K, V2> other, WhenMissing<K, V, V2> MapLeft, WhenMatched<K, V, V2, V2> Merge)
- Union <V2, R> (Map<K, V2> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, V2, R> MapRight, WhenMatched<K, V, V2, R> Merge)
- Intersect <V2, R> (Map<K, V2> other, WhenMatched<K, V, V2, R> Merge)
- Except (Map<K, V> other)
- SymmetricExcept (Map<K, V> other)
- CompareTo (Map<K, V> other)
- CompareTo <OrdV> (Map<K, V> other)
- CompareKeysTo <OrdV> (Map<K, V> other)
- Slice (K keyFrom, K keyTo)
- Min
- Max
- MapKeyEnumerator <K, V>
- MapEnumerator <K, V>
- MapValueEnumerator <K, V>
- MapExtensions
- ToMap <K, V> (this IEnumerable<(K, V)> items)
- ToMap <K, V> (this IEnumerable<Tuple<K, V>> items)
- ToMap <K, V> (this IEnumerable<KeyValuePair<K, V>> items)
- ToMap <K1, K2, V> (this IEnumerable<(K1, K2, V)> items)
- ToMap <K1, K2, V> (this IEnumerable<Tuple<K1, K2, V>> items)
- ToMap <K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items)
- ToMap <K1, K2, K3, V> (this IEnumerable<Tuple<K1, K2, K3, V>> items)
- ToMap <K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items)
- ToMap <K1, K2, K3, K4, V> (this IEnumerable<Tuple<K1, K2, K3, K4, V>> items)
- Map <K, V, U> (this Map<K, V> self, Func<V, U> mapper)
- Map <K, V, U> (this Map<K, V> self, Func<K, V, U> mapper)
- Count <K, V> (this Map<K, V> self)
- Sum <K> (this Map<K, int> self)
- Find <A, B, C> (this Map<A, Map<B, C>> self, A outerKey, B innerKey)
- Find <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey)
- Find <A, B, C, D> (this Map<A, Map<B, C>> self, A outerKey, B innerKey, Func<C, D> Some, Func<D> None)
- Find <A, B, C, D, E> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey, Func<D, E> Some, Func<E> None)
- Find <A, B, C, D, E, F> (this Map<A, Map<B, Map<C, Map<D, E>>>> self, A aKey, B bKey, C cKey, D dKey, Func<E, F> Some, Func<F> None)
- AddOrUpdate <A, B, C> (this Map<A, Map<B, C>> self, A outerKey, B innerKey, Func<C, C> Some, Func<C> None)
- AddOrUpdate <A, B, C> (this Map<A, Map<B, C>> self, A outerKey, B innerKey, C value)
- AddOrUpdate <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey, D value)
- AddOrUpdate <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey, Func<D, D> Some, Func<D> None)
- AddOrUpdate <A, B, C, D, E> (this Map<A, Map<B, Map<C, Map<D, E>>>> self, A aKey, B bKey, C cKey, D dKey, E value)
- AddOrUpdate <A, B, C, D, E> (this Map<A, Map<B, Map<C, Map<D, E>>>> self, A aKey, B bKey, C cKey, D dKey, Func<E, E> Some, Func<E> None)
- Remove <A, B, C> (this Map<A, Map<B, C>> self, A outerKey, B innerKey)
- Remove <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey)
- MapRemoveT <A, B, T, V> (this Map<A, Map<B, T>> self, Func<Map<B, T>, Map<B, V>> map)
- MapRemoveT <A, B, C, T, V> (this Map<A, Map<B, Map<C, T>>> self, Func<Map<C, T>, Map<C, V>> map)
- MapRemoveT <A, B, C, D, T, V> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<Map<D, T>, Map<D, V>> map)
- MapT <A, B, T, V> (this Map<A, Map<B, T>> self, Func<T, V> map)
- MapT <A, B, C, T, V> (this Map<A, Map<B, Map<C, T>>> self, Func<T, V> map)
- MapT <A, B, C, D, T, V> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, V> map)
- FilterT <A, B, T> (this Map<A, Map<B, T>> self, Func<T, bool> pred)
- FilterT <A, B, C, T> (this Map<A, Map<B, Map<C, T>>> self, Func<T, bool> pred)
- FilterT <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred)
- FilterRemoveT <A, B, T> (this Map<A, Map<B, T>> self, Func<T, bool> pred)
- FilterRemoveT <A, B, C, T> (this Map<A, Map<B, Map<C, T>>> self, Func<T, bool> pred)
- FilterRemoveT <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred)
- Exists <A, B, T> (this Map<A, Map<B, T>> self, Func<T, bool> pred)
- Exists <A, B, C, T> (this Map<A, Map<B, Map<C, T>>> self, Func<T, bool> pred)
- Exists <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred)
- ForAll <A, B, T> (this Map<A, Map<B, T>> self, Func<T, bool> pred)
- ForAll <A, B, C, T> (this Map<A, Map<B, Map<C, T>>> self, Func<T, bool> pred)
- ForAll <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred)
- SetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, V value)
- SetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, V value)
- SetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value)
- SetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, Func<V, V> Some)
- SetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some)
- SetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some)
- TrySetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, V value)
- TrySetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, V value)
- TrySetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value)
- TrySetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, Func<V, V> Some)
- TrySetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some)
- TrySetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some)
- FoldT <A, B, S, V> (this Map<A, Map<B, V>> map, S state, Func<S, V, S> folder)
- FoldT <A, B, C, S, V> (this Map<A, Map<B, Map<C, V>>> map, S state, Func<S, V, S> folder)
- FoldT <A, B, C, D, S, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, S state, Func<S, V, S> folder)
- CountT <A, B, V> (this Map<A, Map<B, V>> map)
- CountT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map)
- CountT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map)
- MapOrdExtensions
- Map <OrdK, K, V, U> (this Map<OrdK, K, V> self, Func<V, U> mapper)
- Map <OrdK, K, V, U> (this Map<OrdK, K, V> self, Func<K, V, U> mapper)
- Count <OrdK, K, V> (this Map<OrdK, K, V> self)
- Sum <OrdK, K> (this Map<OrdK, K, int> self)
- AddOpt
- Map
- clear <K, V> (Map<K, V> map)
- empty <K, V> ()
- create <K, V> ()
- create <K, V> (Tuple<K, V> head, params Tuple<K, V>[] tail)
- create <K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail)
- create <K, V> ((K, V) head, params (K, V)[] tail)
- createRange <K, V> (IEnumerable<Tuple<K, V>> keyValues)
- createRange <K, V> (IEnumerable<(K, V)> keyValues)
- createRange <K, V> (IEnumerable<KeyValuePair<K, V>> keyValues)
- add <K, V> (Map<K, V> map, K key, V value)
- tryAdd <K, V> (Map<K, V> map, K key, V value)
- tryAdd <K, V> (Map<K, V> map, K key, V value, Func<Map<K, V>, V, Map<K, V>> Fail)
- addOrUpdate <K, V> (Map<K, V> map, K key, V value)
- addOrUpdate <K, V> (Map<K, V> map, K key, Func<V, V> Some, Func<V> None)
- addOrUpdate <K, V> (Map<K, V> map, K key, Func<V, V> Some, V None)
- addRange <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- addRange <K, V> (Map<K, V> map, IEnumerable<(K, V)> keyValues)
- addRange <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- tryAddRange <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- tryAddRange <K, V> (Map<K, V> map, IEnumerable<(K, V)> keyValues)
- tryAddRange <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- addOrUpdateRange <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> range)
- addOrUpdateRange <K, V> (Map<K, V> map, IEnumerable<(K, V)> range)
- addOrUpdateRange <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> range)
- remove <K, V> (Map<K, V> map, K key)
- containsKey <K, V> (Map<K, V> map, K key)
- contains <K, V> (Map<K, V> map, KeyValuePair<K, V> kv)
- contains <K, V> (Map<K, V> map, Tuple<K, V> kv)
- contains <K, V> (Map<K, V> map, (K, V) kv)
- setItem <K, V> (Map<K, V> map, K key, V value)
- trySetItem <K, V> (Map<K, V> map, K key, V value)
- trySetItem <K, V> (Map<K, V> map, K key, Func<V, V> Some)
- trySetItem <K, V> (Map<K, V> map, K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None)
- setItems <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> items)
- setItems <K, V> (Map<K, V> map, IEnumerable<(K, V)> items)
- setItems <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> items)
- trySetItems <K, V> (Map<K, V> map, IEnumerable<(K, V)> items)
- trySetItems <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <K, V> (Map<K, V> map, IEnumerable<K> keys, Func<V, V> Some)
- find <K, V> (Map<K, V> map, K key)
- findSeq <K, V> (Map<K, V> map, K key)
- find <K, V, R> (Map<K, V> map, K key, Func<V, R> Some, Func<R> None)
- setItem <K, V> (Map<K, V> map, K key, Func<V, V> mapper)
- findRange <K, V> (Map<K, V> map, K keyFrom, K keyTo)
- skip <K, V> (Map<K, V> map, int amount)
- iter <K, V> (Map<K, V> map, Action<V> action)
- iter <K, V> (Map<K, V> map, Action<K, V> action)
- forall <K, V> (Map<K, V> map, Func<V, bool> pred)
- forall <K, V> (Map<K, V> map, Func<K, V, bool> pred)
- forall <K, V> (Map<K, V> map, Func<Tuple<K, V>, bool> pred)
- forall <K, V> (Map<K, V> map, Func<(K Key, V Value), bool> pred)
- forall <K, V> (Map<K, V> map, Func<KeyValuePair<K, V>, bool> pred)
- map <K, T, U> (Map<K, T> map, Func<T, U> f)
- map <K, T, U> (Map<K, T> map, Func<K, T, U> f)
- filter <K, V> (Map<K, V> map, Func<V, bool> predicate)
- filter <K, V> (Map<K, V> map, Func<K, V, bool> predicate)
- choose <K, T, R> (Map<K, T> map, Func<T, Option<R>> selector)
- choose <K, T, R> (Map<K, T> map, Func<K, T, Option<R>> selector)
- length <K, T> (Map<K, T> map)
- fold <S, K, V> (Map<K, V> map, S state, Func<S, K, V, S> folder)
- fold <S, K, V> (Map<K, V> map, S state, Func<S, V, S> folder)
- exists <K, V> (Map<K, V> map, Func<K, V, bool> pred)
- exists <K, V> (Map<K, V> map, Func<Tuple<K, V>, bool> pred)
- exists <K, V> (Map<K, V> map, Func<(K Key, V Value), bool> pred)
- exists <K, V> (Map<K, V> map, Func<KeyValuePair<K, V>, bool> pred)
- exists <K, V> (Map<K, V> map, Func<V, bool> pred)
- freeze <K, V> (IDictionary<K, V> dict)
- Freeze <K, V> (this IDictionary<K, V> dict)
- union <K, V> (Map<K, V> left, Map<K, V> right, WhenMatched<K, V, V, V> Merge)
- union <K, A, B> (Map<K, A> left, Map<K, B> right, WhenMissing<K, B, A> MapRight, WhenMatched<K, A, B, A> Merge)
- union <K, A, B> (Map<K, A> left, Map<K, B> right, WhenMissing<K, A, B> MapLeft, WhenMatched<K, A, B, B> Merge)
- union <K, A, B, C> (Map<K, A> left, Map<K, B> right, WhenMissing<K, A, C> MapLeft, WhenMissing<K, B, C> MapRight, WhenMatched<K, A, B, C> Merge)
- intersect <K, A, B, R> (Map<K, A> left, Map<K, B> right, WhenMatched<K, A, B, R> merge)
- except <K, V> (Map<K, V> left, Map<K, V> right)
- symmetricExcept <K, V> (Map<K, V> left, Map<K, V> right)
- Map
- clear <OrdK, K, V> (Map<OrdK, K, V> map)
- empty <OrdK, K, V> ()
- create <OrdK, K, V> ()
- create <OrdK, K, V> (Tuple<K,V> head, params Tuple<K, V>[] tail)
- create <OrdK, K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail)
- create <OrdK, K, V> ((K, V) head, params (K, V)[] tail)
- createRange <OrdK, K, V> (IEnumerable<Tuple<K, V>> keyValues)
- createRange <OrdK, K, V> (IEnumerable<(K, V)> keyValues)
- createRange <OrdK, K, V> (IEnumerable<KeyValuePair<K, V>> keyValues)
- add <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value)
- tryAdd <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value)
- tryAdd <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value, Func<Map<OrdK, K, V>, V, Map<OrdK, K, V>> Fail)
- addOrUpdate <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value)
- addOrUpdate <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some, Func<V> None)
- addOrUpdate <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some, V None)
- addRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- addRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> keyValues)
- addRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- tryAddRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> keyValues)
- tryAddRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> keyValues)
- tryAddRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues)
- addOrUpdateRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> range)
- addOrUpdateRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> range)
- addOrUpdateRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> range)
- remove <OrdK, K, V> (Map<OrdK, K, V> map, K key)
- containsKey <OrdK, K, V> (Map<OrdK, K, V> map, K key)
- contains <OrdK, K, V> (Map<OrdK, K, V> map, KeyValuePair<K, V> kv)
- contains <OrdK, K, V> (Map<OrdK, K, V> map, Tuple<K, V> kv)
- contains <OrdK, K, V> (Map<OrdK, K, V> map, (K, V) kv)
- setItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value)
- trySetItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value)
- trySetItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some)
- trySetItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None)
- setItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> items)
- setItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> items)
- setItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> items)
- trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> items)
- trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> items)
- trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<K> keys, Func<V, V> Some)
- find <OrdK, K, V> (Map<OrdK, K, V> map, K key)
- findSeq <OrdK, K, V> (Map<OrdK, K, V> map, K key)
- find <OrdK, K, V, R> (Map<OrdK, K, V> map, K key, Func<V, R> Some, Func<R> None)
- setItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> mapper)
- findRange <OrdK, K, V> (Map<OrdK, K, V> map, K keyFrom, K keyTo)
- skip <OrdK, K, V> (Map<OrdK, K, V> map, int amount)
- iter <OrdK, K, V> (Map<OrdK, K, V> map, Action<V> action)
- iter <OrdK, K, V> (Map<OrdK, K, V> map, Action<K, V> action)
- forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<V, bool> pred)
- forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<K, V, bool> pred)
- forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<Tuple<K, V>, bool> pred)
- forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<(K Key, V Value), bool> pred)
- forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<KeyValuePair<K, V>, bool> pred)
- map <OrdK, K, T, U> (Map<OrdK, K, T> map, Func<T, U> f)
- map <OrdK, K, T, U> (Map<OrdK, K, T> map, Func<K, T, U> f)
- filter <OrdK, K, V> (Map<OrdK, K, V> map, Func<V, bool> predicate)
- filter <OrdK, K, V> (Map<OrdK, K, V> map, Func<K, V, bool> predicate)
- choose <OrdK, K, T, R> (Map<OrdK, K, T> map, Func<T, Option<R>> selector)
- choose <OrdK, K, T, R> (Map<OrdK, K, T> map, Func<K, T, Option<R>> selector)
- length <OrdK, K, T> (Map<OrdK, K, T> map)
- fold <OrdK, S, K, V> (Map<OrdK, K, V> map, S state, Func<S, K, V, S> folder)
- fold <OrdK, S, K, V> (Map<OrdK, K, V> map, S state, Func<S, V, S> folder)
- exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<K, V, bool> pred)
- exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<Tuple<K, V>, bool> pred)
- exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<(K Key, V Value), bool> pred)
- exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<KeyValuePair<K, V>, bool> pred)
- exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<V, bool> pred)
- freeze <OrdK, K, V> (IDictionary<K, V> dict)
- Freeze <OrdK, K, V> (this IDictionary<K, V> dict)
- union <OrdK, K, V> (Map<OrdK, K, V> left, Map<OrdK, K, V> right, WhenMatched<K, V, V, V> Merge)
- union <OrdK, K, A, B> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMissing<K, B, A> MapRight, WhenMatched<K, A, B, A> Merge)
- union <OrdK, K, A, B> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMissing<K, A, B> MapLeft, WhenMatched<K, A, B, B> Merge)
- union <OrdK, K, A, B, C> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMissing<K, A, C> MapLeft, WhenMissing<K, B, C> MapRight, WhenMatched<K, A, B, C> Merge)
- intersect <OrdK, K, A, B, R> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMatched<K, A, B, R> merge)
- except <OrdK, K, V> (Map<OrdK, K, V> left, Map<OrdK, K, V> right)
- symmetricExcept <OrdK, K, V> (Map<OrdK, K, V> left, Map<OrdK, K, V> right)
- Map <OrdK, K, V>
- Map (IEnumerable<(K Key, V Value)> items)
- Map (IEnumerable<(K Key, V Value)> items, bool tryAdd)
- Case
- this []
- IsEmpty
- Count
- Length
- Add (K key, V value)
- TryAdd (K key, V value)
- TryAdd (K key, V value, Func<Map<OrdK, K, V>, V, Map<OrdK, K, V>> Fail)
- AddRange (IEnumerable<Tuple<K, V>> range)
- AddRange (IEnumerable<(K, V)> range)
- TryAddRange (IEnumerable<Tuple<K, V>> range)
- TryAddRange (IEnumerable<(K, V)> range)
- TryAddRange (IEnumerable<KeyValuePair<K, V>> range)
- AddOrUpdateRange (IEnumerable<Tuple<K, V>> range)
- AddOrUpdateRange (IEnumerable<(K, V)> range)
- AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range)
- Remove (K key)
- Find (K key)
- FindSeq (K key)
- Find <R> (K key, Func<V, R> Some, Func<R> None)
- FindPredecessor (K key)
- FindExactOrPredecessor (K key)
- FindSuccessor (K key)
- FindExactOrSuccessor (K key)
- FindOrAdd (K key, Func<V> None)
- FindOrAdd (K key, V value)
- FindOrMaybeAdd (K key, Func<Option<V>> None)
- FindOrMaybeAdd (K key, Option<V> None)
- SetItem (K key, V value)
- SetItem (K key, Func<V, V> Some)
- TrySetItem (K key, V value)
- TrySetItem (K key, Func<V, V> Some)
- TrySetItem (K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None)
- AddOrUpdate (K key, V value)
- AddOrUpdate (K key, Func<V, V> Some, Func<V> None)
- AddOrUpdate (K key, Func<V, V> Some, V None)
- FindRange (K keyFrom, K keyTo)
- FindRangePairs (K keyFrom, K keyTo)
- Skip (int amount)
- ContainsKey (K key)
- Contains (K key, V value)
- Clear ()
- AddRange (IEnumerable<KeyValuePair<K, V>> pairs)
- SetItems (IEnumerable<KeyValuePair<K, V>> items)
- SetItems (IEnumerable<Tuple<K, V>> items)
- SetItems (IEnumerable<(K, V)> items)
- TrySetItems (IEnumerable<KeyValuePair<K, V>> items)
- TrySetItems (IEnumerable<Tuple<K, V>> items)
- TrySetItems (IEnumerable<(K, V)> items)
- TrySetItems (IEnumerable<K> keys, Func<V, V> Some)
- RemoveRange (IEnumerable<K> keys)
- Contains (KeyValuePair<K, V> pair)
- Keys
- Values
- ToDictionary ()
- ToDictionary <KR, VR> (Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector)
- ToReadOnlyDictionary ()
- Tuples
- ValueTuples
- GetEnumerator ()
- ToSeq ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- AsEnumerable ()
- Empty = new Map<OrdK, K, V>(MapInternal<OrdK, K, V>.Empty)
- == (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- != (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- < (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- <= (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- > (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- >= (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- + (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- - (Map<OrdK, K, V> lhs, Map<OrdK, K, V> rhs)
- Equals (object obj)
- Equals (Map<OrdK, K, V> y)
- Equals <EqV> (Map<OrdK, K, V> y)
- EqualsKeys (Map<OrdK, K, V> y)
- GetHashCode ()
- CompareTo (object obj)
- Do (Action<V> f)
- Select <U> (Func<V, U> mapper)
- Select <U> (Func<K, V, U> mapper)
- Where (Func<V, bool> valuePred)
- Where (Func<K, V, bool> keyValuePred)
- Filter (Func<V, bool> valuePred)
- Filter (Func<K, V, bool> keyValuePred)
- ForAll (Func<K, V, bool> pred)
- ForAll (Func<Tuple<K, V>, bool> pred)
- ForAll (Func<(K Key, V Value), bool> pred)
- ForAll (Func<KeyValuePair<K, V>, bool> pred)
- ForAll (Func<V, bool> pred)
- Exists (Func<K, V, bool> pred)
- Exists (Func<Tuple<K, V>, bool> pred)
- Exists (Func<(K, V), bool> pred)
- Exists (Func<KeyValuePair<K, V>, bool> pred)
- Exists (Func<V, bool> pred)
- Iter (Action<K, V> action)
- Iter (Action<V> action)
- Iter (Action<Tuple<K, V>> action)
- Iter (Action<(K, V)> action)
- Iter (Action<KeyValuePair<K, V>> action)
- Choose <U> (Func<K, V, Option<U>> selector)
- Choose <U> (Func<V, Option<U>> selector)
- Fold <S> (S state, Func<S, K, V, S> folder)
- Fold <S> (S state, Func<S, V, S> folder)
- Union (Map<OrdK, K, V> other, WhenMatched<K, V, V, V> Merge)
- Union <V2> (Map<OrdK, K, V2> other, WhenMissing<K, V2, V> MapRight, WhenMatched<K, V, V2, V> Merge)
- Union <V2> (Map<OrdK, K, V2> other, WhenMissing<K, V, V2> MapLeft, WhenMatched<K, V, V2, V2> Merge)
- Union <V2, R> (Map<OrdK, K, V2> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, V2, R> MapRight, WhenMatched<K, V, V2, R> Merge)
- Intersect <V2, R> (Map<OrdK, K, V2> other, WhenMatched<K, V, V2, R> Merge)
- Except (Map<OrdK, K, V> other)
- SymmetricExcept (Map<OrdK, K, V> other)
- CompareTo (Map<OrdK, K, V> other)
- CompareTo <OrdV> (Map<OrdK, K, V> other)
- CompareKeysTo (Map<OrdK, K, V> other)
- Slice (K keyFrom, K keyTo)
- Min
- Max
delegate WhenMissing <in K, in A, out B> Source #
delegate WhenMatched <in K, in A, in B, out C> Source #
Immutable map AVL tree implementation AVL tree is a self-balancing binary search tree. wikipedia.org/wiki/AVL_tree
type | K | Key type |
type | V | Value type |
field Map<K, V> Empty = new Map<K, V>(MapInternal<OrdDefault<K>, K, V>.Empty) Source #
Reference version for use in pattern-matching
Empty collection = null
Singleton collection = (K, V)
More = ((K, V), Seq<(K, V)>) -- head and tail
var res = list.Case switch
{
(var x, var xs) => ...,
A value => ...,
_ => ...
}
property IEnumerable<Tuple<K, V>> Tuples Source #
Enumerable of in-order tuples that make up the map
returns | Tuples |
property IEnumerable<(K Key, V Value)> Pairs Source #
Enumerable of in-order tuples that make up the map
returns | Tuples |
property IEnumerable<(K Key, V Value)> ValueTuples Source #
Enumerable of in-order tuples that make up the map
returns | Tuples |
method Lens<Map<K, V>, Option<V>> itemOrNone (K key) Source #
Item or none at index lens
method Map<K, V> Add (K key, V value) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> TryAdd (K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> TryAdd (K key, V value, Func<Map<K, V>, V, Map<K, V>> Fail) Source #
Atomically adds a new item to the map. If the key already exists then the Fail handler is called with the unaltered map and the value already set for the key, it expects a new map returned.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
param | Fail | Delegate to handle failure, you're given the unaltered map and the value already set for the key |
returns | New Map with the item added |
method Map<K, V> AddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> AddRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> TryAddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> TryAddRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> TryAddRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<K, V> AddOrUpdateRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> AddOrUpdateRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<K, V> Remove (K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method Option<V> Find (K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method IEnumerable<V> FindSeq (K key) Source #
Retrieve a value from the map by key as an enumerable
param | key | Key to find |
returns | Found value |
method R Find <R> (K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method Option<(K Key, V Value)> FindPredecessor (K key) Source #
Retrieve the value from previous item to specified key
param | key | Key to find |
returns | Found key/value |
method Option<(K Key, V Value)> FindExactOrPredecessor (K key) Source #
Retrieve the value from exact key, or if not found, the previous item
param | key | Key to find |
returns | Found key/value |
method Option<(K Key, V Value)> FindSuccessor (K key) Source #
Retrieve the value from next item to specified key
param | key | Key to find |
returns | Found key/value |
method Option<(K Key, V Value)> FindExactOrSuccessor (K key) Source #
Retrieve the value from exact key, or if not found, the next item
param | key | Key to find |
returns | Found key/value |
method (Map<K, V> Map, V Value) FindOrAdd (K key, Func<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (Map<K, V>, V Value) FindOrAdd (K key, V value) Source #
Try to find the key in the map, if it doesn't exist, add a new item provided.
param | key | Key to find |
param | value | Delegate to get the value |
returns | Updated map and added value |
method (Map<K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Func<Option<V>> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (Map<K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Option<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method Map<K, V> SetItem (K key, V value) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> SetItem (K key, Func<V, V> Some) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to set |
returns | New map with the mapped value |
method Map<K, V> TrySetItem (K key, V value) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> TrySetItem (K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Silently fails if the value doesn't exist
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method Map<K, V> TrySetItem (K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Calls the None delegate to return a new map if the item can't be found
Null is not allowed for a Key or a Value
param | key | Key |
param | Some | delegate to map the existing value to a new one before setting |
param | None | delegate to return a new map if the item can't be found |
returns | New map with the item set |
method Map<K, V> AddOrUpdate (K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> AddOrUpdate (K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method Map<K, V> AddOrUpdate (K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method IEnumerable<V> FindRange (K keyFrom, K keyTo) Source #
Retrieve a range of values
param | keyFrom | Range start (inclusive) |
param | keyTo | Range to (inclusive) |
returns | Range of values |
method IEnumerable<(K Key, V Value)> FindRangePairs (K keyFrom, K keyTo) Source #
Retrieve a range of values
param | keyFrom | Range start (inclusive) |
param | keyTo | Range to (inclusive) |
returns | Range of key, values |
method IEnumerable<(K Key, V Value)> Skip (int amount) Source #
Skips 'amount' values and returns a new tree without the skipped values.
param | amount | Amount to skip |
returns | New tree |
method bool ContainsKey (K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool Contains (K key, V value) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method Map<K, V> Clear () Source #
Clears all items from the map
Functionally equivalent to calling Map.empty as the original structure is untouched
returns | Empty map |
method Map<K, V> AddRange (IEnumerable<KeyValuePair<K, V>> pairs) Source #
Atomically adds a range of items to the map
param | pairs | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<K, V> SetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> SetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> SetItems (IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> TrySetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> TrySetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> TrySetItems (IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> TrySetItems (IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method Map<K, V> RemoveRange (IEnumerable<K> keys) Source #
Atomically removes a set of keys from the map
param | keys | Keys to remove |
returns | New map with the items removed |
method bool Contains (KeyValuePair<K, V> pair) Source #
Returns true if a Key/Value pair exists in the map
param | pair | Pair to find |
returns | True if exists, false otherwise |
method IReadOnlyDictionary<K, V> ToDictionary () Source #
Convert the map to an IReadOnlyDictionary<K, V>
returns |
method IDictionary<KR, VR> ToDictionary <KR, VR> (Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector) Source #
Map the map the a dictionary
method IReadOnlyDictionary<K, V> ToReadOnlyDictionary () Source #
Get a IReadOnlyDictionary for this map. No mapping is required, so this is very fast.
method MapEnumerator<K, V> GetEnumerator () Source #
GetEnumerator - IEnumerable interface
method string ToString () Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
The elipsis is used for collections over 50 items
To get a formatted string with all the items, use ToFullString
or ToFullArrayString
.
method string ToFullString (string separator = ", ") Source #
Format the collection as (key: value), (key: value), (key: value), ...
method string ToFullArrayString (string separator = ", ") Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
method IEnumerable<(K Key, V Value)> AsEnumerable () Source #
method bool Equals (object obj) Source #
Equality of keys and values with EqDefault<V>
used for values
method bool Equals (Map<K, V> y) Source #
Equality of keys and values with EqDefault<V>
used for values
method bool Equals <EqV> (Map<K, V> y) Source #
Equality of keys and values
method bool EqualsKeys (Map<K, V> y) Source #
Equality of keys only
method int GetHashCode () Source #
method Map<K, V> Do (Action<V> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method Map<K, U> Select <U> (Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<K, U> Select <U> (Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<K, V> Where (Func<V, bool> valuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | valuePred | Predicate |
returns | New map with items filtered |
method Map<K, V> Where (Func<K, V, bool> keyValuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | keyValuePred | Predicate |
returns | New map with items filtered |
method Map<K, V> Filter (Func<V, bool> valuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | valuePred | Predicate |
returns | New map with items filtered |
method Map<K, V> Filter (Func<K, V, bool> keyValuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method bool ForAll (Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<Tuple<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<K, V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<Tuple<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<(K, V), bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Unit Iter (Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<V> action) Source #
Atomically iterate through all values in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<Tuple<K, V>> action) Source #
Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<(K, V)> action) Source #
Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<KeyValuePair<K, V>> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Map<K, U> Choose <U> (Func<K, V, Option<U>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method Map<K, U> Choose <U> (Func<V, Option<U>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method S Fold <S> (S state, Func<S, K, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method S Fold <S> (S state, Func<S, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method Map<K, V> Union (Map<K, V> other, WhenMatched<K, V, V, V> Merge) Source #
Union two maps. The merge function is called when keys are present in both map.
method Map<K, V> Union <V2> (Map<K, V2> other, WhenMissing<K, V2, V> MapRight, WhenMatched<K, V, V2, V> Merge) Source #
Union two maps. The merge function is called when keys are present in both map.
method Map<K, V2> Union <V2> (Map<K, V2> other, WhenMissing<K, V, V2> MapLeft, WhenMatched<K, V, V2, V2> Merge) Source #
Union two maps. The merge function is called when keys are present in both map.
method Map<K, R> Union <V2, R> (Map<K, V2> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, V2, R> MapRight, WhenMatched<K, V, V2, R> Merge) Source #
Union two maps. The merge function is called when keys are present in both map.
method Map<K, V> SymmetricExcept (Map<K, V> other) Source #
Keys that are in both maps are dropped and the remaining items are merged and returned.
method int CompareTo (Map<K, V> other) Source #
Compare keys and values (values use OrdDefault<V>
for ordering)
method int CompareTo <OrdV> (Map<K, V> other) Source #
Compare keys and values (values use OrdV
for ordering)
method int CompareKeysTo <OrdV> (Map<K, V> other) Source #
Compare keys only
struct MapKeyEnumerator <K, V> Source #
struct MapEnumerator <K, V> Source #
struct MapValueEnumerator <K, V> Source #
class MapExtensions Source #
method Map<K, V> ToMap <K, V> (this IEnumerable<Tuple<K, V>> items) Source #
Create an immutable map
method Map<K, V> ToMap <K, V> (this IEnumerable<KeyValuePair<K, V>> items) Source #
Create an immutable map
method Map<K1, Map<K2, V>> ToMap <K1, K2, V> (this IEnumerable<(K1, K2, V)> items) Source #
Create an immutable map
method Map<K1, Map<K2, V>> ToMap <K1, K2, V> (this IEnumerable<Tuple<K1, K2, V>> items) Source #
Create an immutable map
method Map<K1, Map<K2, Map<K3, V>>> ToMap <K1, K2, K3, V> (this IEnumerable<(K1, K2, K3, V)> items) Source #
Create an immutable map
method Map<K1, Map<K2, Map<K3, V>>> ToMap <K1, K2, K3, V> (this IEnumerable<Tuple<K1, K2, K3, V>> items) Source #
Create an immutable map
method Map<K1, Map<K2, Map<K3, Map<K4, V>>>> ToMap <K1, K2, K3, K4, V> (this IEnumerable<(K1, K2, K3, K4, V)> items) Source #
Create an immutable map
method Map<K1, Map<K2, Map<K3, Map<K4, V>>>> ToMap <K1, K2, K3, K4, V> (this IEnumerable<Tuple<K1, K2, K3, K4, V>> items) Source #
Create an immutable map
method Map<K, U> Map <K, V, U> (this Map<K, V> self, Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<K, U> Map <K, V, U> (this Map<K, V> self, Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Option<D> Find <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey) Source #
method D Find <A, B, C, D> (this Map<A, Map<B, C>> self, A outerKey, B innerKey, Func<C, D> Some, Func<D> None) Source #
method E Find <A, B, C, D, E> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey, Func<D, E> Some, Func<E> None) Source #
method F Find <A, B, C, D, E, F> (this Map<A, Map<B, Map<C, Map<D, E>>>> self, A aKey, B bKey, C cKey, D dKey, Func<E, F> Some, Func<F> None) Source #
method Map<A, Map<B, C>> AddOrUpdate <A, B, C> (this Map<A, Map<B, C>> self, A outerKey, B innerKey, Func<C, C> Some, Func<C> None) Source #
method Map<A, Map<B, C>> AddOrUpdate <A, B, C> (this Map<A, Map<B, C>> self, A outerKey, B innerKey, C value) Source #
method Map<A, Map<B, Map<C, D>>> AddOrUpdate <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey, D value) Source #
method Map<A, Map<B, Map<C, D>>> AddOrUpdate <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey, Func<D, D> Some, Func<D> None) Source #
method Map<A, Map<B, Map<C, Map<D, E>>>> AddOrUpdate <A, B, C, D, E> (this Map<A, Map<B, Map<C, Map<D, E>>>> self, A aKey, B bKey, C cKey, D dKey, E value) Source #
method Map<A, Map<B, Map<C, Map<D, E>>>> AddOrUpdate <A, B, C, D, E> (this Map<A, Map<B, Map<C, Map<D, E>>>> self, A aKey, B bKey, C cKey, D dKey, Func<E, E> Some, Func<E> None) Source #
method Map<A, Map<B, C>> Remove <A, B, C> (this Map<A, Map<B, C>> self, A outerKey, B innerKey) Source #
method Map<A, Map<B, Map<C, D>>> Remove <A, B, C, D> (this Map<A, Map<B, Map<C, D>>> self, A aKey, B bKey, C cKey) Source #
method Map<A, Map<B, V>> MapRemoveT <A, B, T, V> (this Map<A, Map<B, T>> self, Func<Map<B, T>, Map<B, V>> map) Source #
method Map<A, Map<B, Map<C, V>>> MapRemoveT <A, B, C, T, V> (this Map<A, Map<B, Map<C, T>>> self, Func<Map<C, T>, Map<C, V>> map) Source #
method Map<A, Map<B, Map<C, Map<D, V>>>> MapRemoveT <A, B, C, D, T, V> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<Map<D, T>, Map<D, V>> map) Source #
method Map<A, Map<B, Map<C, V>>> MapT <A, B, C, T, V> (this Map<A, Map<B, Map<C, T>>> self, Func<T, V> map) Source #
method Map<A, Map<B, Map<C, Map<D, V>>>> MapT <A, B, C, D, T, V> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, V> map) Source #
method Map<A, Map<B, T>> FilterT <A, B, T> (this Map<A, Map<B, T>> self, Func<T, bool> pred) Source #
method Map<A, Map<B, Map<C, T>>> FilterT <A, B, C, T> (this Map<A, Map<B, Map<C, T>>> self, Func<T, bool> pred) Source #
method Map<A, Map<B, Map<C, Map<D, T>>>> FilterT <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred) Source #
method Map<A, Map<B, T>> FilterRemoveT <A, B, T> (this Map<A, Map<B, T>> self, Func<T, bool> pred) Source #
method Map<A, Map<B, Map<C, T>>> FilterRemoveT <A, B, C, T> (this Map<A, Map<B, Map<C, T>>> self, Func<T, bool> pred) Source #
method Map<A, Map<B, Map<C, Map<D, T>>>> FilterRemoveT <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred) Source #
method bool Exists <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred) Source #
method bool ForAll <A, B, C, D, T> (this Map<A, Map<B, Map<C, Map<D, T>>>> self, Func<T, bool> pred) Source #
method Map<A, Map<B, V>> SetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, V value) Source #
method Map<A, Map<B, Map<C, V>>> SetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, V value) Source #
method Map<A, Map<B, Map<C, Map<D, V>>>> SetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value) Source #
method Map<A, Map<B, V>> SetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, Func<V, V> Some) Source #
method Map<A, Map<B, Map<C, V>>> SetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some) Source #
method Map<A, Map<B, Map<C, Map<D, V>>>> SetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some) Source #
method Map<A, Map<B, V>> TrySetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, V value) Source #
method Map<A, Map<B, Map<C, V>>> TrySetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, V value) Source #
method Map<A, Map<B, Map<C, Map<D, V>>>> TrySetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, V value) Source #
method Map<A, Map<B, V>> TrySetItemT <A, B, V> (this Map<A, Map<B, V>> map, A aKey, B bKey, Func<V, V> Some) Source #
method Map<A, Map<B, Map<C, V>>> TrySetItemT <A, B, C, V> (this Map<A, Map<B, Map<C, V>>> map, A aKey, B bKey, C cKey, Func<V, V> Some) Source #
method Map<A, Map<B, Map<C, Map<D, V>>>> TrySetItemT <A, B, C, D, V> (this Map<A, Map<B, Map<C, Map<D, V>>>> map, A aKey, B bKey, C cKey, D dKey, Func<V, V> Some) Source #
method S FoldT <A, B, C, S, V> (this Map<A, Map<B, Map<C, V>>> map, S state, Func<S, V, S> folder) Source #
class MapOrdExtensions Source #
method Map<OrdK, K, U> Map <OrdK, K, V, U> (this Map<OrdK, K, V> self, Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<OrdK, K, U> Map <OrdK, K, V, U> (this Map<OrdK, K, V> self, Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
Immutable map module AVL tree implementation AVL tree is a self-balancing binary search tree. wikipedia.org/wiki/AVL_tree
method Map<K, V> clear <K, V> (Map<K, V> map) Source #
Clears all items from the map
Functionally equivalent to calling Map.empty as the original structure is untouched
param | map | Map to clear |
returns | Empty map |
method Map<K, V> create <K, V> (Tuple<K, V> head, params Tuple<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method Map<K, V> create <K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method Map<K, V> create <K, V> ((K, V) head, params (K, V)[] tail) Source #
Creates a new Map seeded with the keyValues provided
method Map<K, V> createRange <K, V> (IEnumerable<Tuple<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method Map<K, V> createRange <K, V> (IEnumerable<(K, V)> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method Map<K, V> createRange <K, V> (IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method Map<K, V> add <K, V> (Map<K, V> map, K key, V value) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> tryAdd <K, V> (Map<K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> tryAdd <K, V> (Map<K, V> map, K key, V value, Func<Map<K, V>, V, Map<K, V>> Fail) Source #
Atomically adds a new item to the map. If the key already exists then the Fail handler is called with the unaltered map and the value already set for the key, it expects a new map returned.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
param | Fail | Delegate to handle failure, you're given the unaltered map and the value already set for the key |
returns | New Map with the item added |
method Map<K, V> addOrUpdate <K, V> (Map<K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> addOrUpdate <K, V> (Map<K, V> map, K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method Map<K, V> addOrUpdate <K, V> (Map<K, V> map, K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method Map<K, V> addRange <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> addRange <K, V> (Map<K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> addRange <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> tryAddRange <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> tryAddRange <K, V> (Map<K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> tryAddRange <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<K, V> addOrUpdateRange <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> addOrUpdateRange <K, V> (Map<K, V> map, IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<K, V> addOrUpdateRange <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<K, V> remove <K, V> (Map<K, V> map, K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method bool containsKey <K, V> (Map<K, V> map, K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <K, V> (Map<K, V> map, KeyValuePair<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <K, V> (Map<K, V> map, Tuple<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <K, V> (Map<K, V> map, (K, V) kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method Map<K, V> setItem <K, V> (Map<K, V> map, K key, V value) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> trySetItem <K, V> (Map<K, V> map, K key, V value) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<K, V> trySetItem <K, V> (Map<K, V> map, K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map (Some), and then putting it back. Silently fails if the value doesn't exist.
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method Map<K, V> trySetItem <K, V> (Map<K, V> map, K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Calls the None delegate to return a new map if the item can't be found
Null is not allowed for a Key or a Value
param | key | Key |
param | Some | delegate to map the existing value to a new one before setting |
param | None | delegate to return a new map if the item can't be found |
returns | New map with the item set |
method Map<K, V> setItems <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> setItems <K, V> (Map<K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> setItems <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> trySetItems <K, V> (Map<K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> trySetItems <K, V> (Map<K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> trySetItems <K, V> (Map<K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<K, V> trySetItems <K, V> (Map<K, V> map, IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method Option<V> find <K, V> (Map<K, V> map, K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method IEnumerable<V> findSeq <K, V> (Map<K, V> map, K key) Source #
Retrieve a value from the map by key as an enumerable
param | key | Key to find |
returns | Found value |
method R find <K, V, R> (Map<K, V> map, K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method Map<K, V> setItem <K, V> (Map<K, V> map, K key, Func<V, V> mapper) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to find |
returns | New map with the mapped value |
method IEnumerable<V> findRange <K, V> (Map<K, V> map, K keyFrom, K keyTo) Source #
Retrieve a range of values
param | keyFrom | Range start (inclusive) |
param | keyTo | Range to (inclusive) |
returns | Range of values |
method IEnumerable<(K Key, V Value)> skip <K, V> (Map<K, V> map, int amount) Source #
Skips 'amount' values and returns a new tree without the skipped values.
param | amount | Amount to skip |
returns | Enumerable of map items |
method Unit iter <K, V> (Map<K, V> map, Action<V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit iter <K, V> (Map<K, V> map, Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method bool forall <K, V> (Map<K, V> map, Func<V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <K, V> (Map<K, V> map, Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <K, V> (Map<K, V> map, Func<Tuple<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <K, V> (Map<K, V> map, Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <K, V> (Map<K, V> map, Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Map<K, U> map <K, T, U> (Map<K, T> map, Func<T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<K, U> map <K, T, U> (Map<K, T> map, Func<K, T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<K, V> filter <K, V> (Map<K, V> map, Func<V, bool> predicate) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method Map<K, V> filter <K, V> (Map<K, V> map, Func<K, V, bool> predicate) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method Map<K, R> choose <K, T, R> (Map<K, T> map, Func<T, Option<R>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method Map<K, R> choose <K, T, R> (Map<K, T> map, Func<K, T, Option<R>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method S fold <S, K, V> (Map<K, V> map, S state, Func<S, K, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method S fold <S, K, V> (Map<K, V> map, S state, Func<S, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method bool exists <K, V> (Map<K, V> map, Func<K, V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <K, V> (Map<K, V> map, Func<Tuple<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <K, V> (Map<K, V> map, Func<(K Key, V Value), bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <K, V> (Map<K, V> map, Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <K, V> (Map<K, V> map, Func<V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Map<K, V> freeze <K, V> (IDictionary<K, V> dict) Source #
Convert any IDictionary into an immutable Map K V
method Map<K, V> Freeze <K, V> (this IDictionary<K, V> dict) Source #
Convert any IDictionary into an immutable Map K V
method Map<K, V> union <K, V> (Map<K, V> left, Map<K, V> right, WhenMatched<K, V, V, V> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<K, A> union <K, A, B> (Map<K, A> left, Map<K, B> right, WhenMissing<K, B, A> MapRight, WhenMatched<K, A, B, A> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<K, B> union <K, A, B> (Map<K, A> left, Map<K, B> right, WhenMissing<K, A, B> MapLeft, WhenMatched<K, A, B, B> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<K, C> union <K, A, B, C> (Map<K, A> left, Map<K, B> right, WhenMissing<K, A, C> MapLeft, WhenMissing<K, B, C> MapRight, WhenMatched<K, A, B, C> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<K, R> intersect <K, A, B, R> (Map<K, A> left, Map<K, B> right, WhenMatched<K, A, B, R> merge) Source #
method Map<K, V> except <K, V> (Map<K, V> left, Map<K, V> right) Source #
Map differencing based on key. this - other.
method Map<K, V> symmetricExcept <K, V> (Map<K, V> left, Map<K, V> right) Source #
Keys that are in both maps are dropped and the remaining items are merged and returned.
Immutable map module AVL tree implementation AVL tree is a self-balancing binary search tree. en.wikipedia.org/wiki/AVL_tree
method Map<OrdK, K, V> clear <OrdK, K, V> (Map<OrdK, K, V> map) Source #
Clears all items from the map
Functionally equivalent to calling Map.empty as the original structure is untouched
param | map | Map to clear |
returns | Empty map |
method Map<OrdK, K, V> empty <OrdK, K, V> () Source #
Creates a new empty Map
method Map<OrdK, K, V> create <OrdK, K, V> () Source #
Creates a new empty Map
method Map<OrdK, K, V> create <OrdK, K, V> (Tuple<K,V> head, params Tuple<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method Map<OrdK, K, V> create <OrdK, K, V> (KeyValuePair<K, V> head, params KeyValuePair<K, V>[] tail) Source #
Creates a new Map seeded with the keyValues provided
method Map<OrdK, K, V> create <OrdK, K, V> ((K, V) head, params (K, V)[] tail) Source #
Creates a new Map seeded with the keyValues provided
method Map<OrdK, K, V> createRange <OrdK, K, V> (IEnumerable<Tuple<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method Map<OrdK, K, V> createRange <OrdK, K, V> (IEnumerable<(K, V)> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method Map<OrdK, K, V> createRange <OrdK, K, V> (IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Creates a new Map seeded with the keyValues provided
method Map<OrdK, K, V> add <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> tryAdd <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> tryAdd <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value, Func<Map<OrdK, K, V>, V, Map<OrdK, K, V>> Fail) Source #
Atomically adds a new item to the map. If the key already exists then the Fail handler is called with the unaltered map and the value already set for the key, it expects a new map returned.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
param | Fail | Delegate to handle failure, you're given the unaltered map and the value already set for the key |
returns | New Map with the item added |
method Map<OrdK, K, V> addOrUpdate <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> addOrUpdate <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method Map<OrdK, K, V> addOrUpdate <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method Map<OrdK, K, V> addRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> addRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> addRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> tryAddRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> tryAddRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> tryAddRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> keyValues) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<OrdK, K, V> addOrUpdateRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> addOrUpdateRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> addOrUpdateRange <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<OrdK, K, V> remove <OrdK, K, V> (Map<OrdK, K, V> map, K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method bool containsKey <OrdK, K, V> (Map<OrdK, K, V> map, K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <OrdK, K, V> (Map<OrdK, K, V> map, KeyValuePair<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <OrdK, K, V> (Map<OrdK, K, V> map, Tuple<K, V> kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool contains <OrdK, K, V> (Map<OrdK, K, V> map, (K, V) kv) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method Map<OrdK, K, V> setItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> trySetItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, V value) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> trySetItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map (Some), and then putting it back. Silently fails if the value doesn't exist.
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method Map<OrdK, K, V> trySetItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Calls the None delegate to return a new map if the item can't be found
Null is not allowed for a Key or a Value
param | key | Key |
param | Some | delegate to map the existing value to a new one before setting |
param | None | delegate to return a new map if the item can't be found |
returns | New map with the item set |
method Map<OrdK, K, V> setItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> setItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> setItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> trySetItems <OrdK, K, V> (Map<OrdK, K, V> map, IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method Option<V> find <OrdK, K, V> (Map<OrdK, K, V> map, K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method IEnumerable<V> findSeq <OrdK, K, V> (Map<OrdK, K, V> map, K key) Source #
Retrieve a value from the map by key as an enumerable
param | key | Key to find |
returns | Found value |
method R find <OrdK, K, V, R> (Map<OrdK, K, V> map, K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method Map<OrdK, K, V> setItem <OrdK, K, V> (Map<OrdK, K, V> map, K key, Func<V, V> mapper) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to find |
returns | New map with the mapped value |
method IEnumerable<V> findRange <OrdK, K, V> (Map<OrdK, K, V> map, K keyFrom, K keyTo) Source #
Retrieve a range of values
param | keyFrom | Range start (inclusive) |
param | keyTo | Range to (inclusive) |
returns | Range of values |
method IEnumerable<(K Key, V Value)> skip <OrdK, K, V> (Map<OrdK, K, V> map, int amount) Source #
Skips 'amount' values and returns a new tree without the skipped values.
param | amount | Amount to skip |
returns | Enumerable of map items |
method Unit iter <OrdK, K, V> (Map<OrdK, K, V> map, Action<V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit iter <OrdK, K, V> (Map<OrdK, K, V> map, Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method bool forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<Tuple<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool forall <OrdK, K, V> (Map<OrdK, K, V> map, Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Map<OrdK, K, U> map <OrdK, K, T, U> (Map<OrdK, K, T> map, Func<T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<OrdK, K, U> map <OrdK, K, T, U> (Map<OrdK, K, T> map, Func<K, T, U> f) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<OrdK, K, V> filter <OrdK, K, V> (Map<OrdK, K, V> map, Func<V, bool> predicate) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method Map<OrdK, K, V> filter <OrdK, K, V> (Map<OrdK, K, V> map, Func<K, V, bool> predicate) Source #
Atomically filter out items that return false when a predicate is applied
param | pred | Predicate |
returns | New map with items filtered |
method Map<OrdK, K, R> choose <OrdK, K, T, R> (Map<OrdK, K, T> map, Func<T, Option<R>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method Map<OrdK, K, R> choose <OrdK, K, T, R> (Map<OrdK, K, T> map, Func<K, T, Option<R>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method int length <OrdK, K, T> (Map<OrdK, K, T> map) Source #
Number of items in the map
method S fold <OrdK, S, K, V> (Map<OrdK, K, V> map, S state, Func<S, K, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method S fold <OrdK, S, K, V> (Map<OrdK, K, V> map, S state, Func<S, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method bool exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<K, V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<Tuple<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<(K Key, V Value), bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool exists <OrdK, K, V> (Map<OrdK, K, V> map, Func<V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Map<OrdK, K, V> freeze <OrdK, K, V> (IDictionary<K, V> dict) Source #
Convert any IDictionary into an immutable Map K V
method Map<OrdK, K, V> Freeze <OrdK, K, V> (this IDictionary<K, V> dict) Source #
Convert any IDictionary into an immutable Map K V
method Map<OrdK, K, V> union <OrdK, K, V> (Map<OrdK, K, V> left, Map<OrdK, K, V> right, WhenMatched<K, V, V, V> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, A> union <OrdK, K, A, B> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMissing<K, B, A> MapRight, WhenMatched<K, A, B, A> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, B> union <OrdK, K, A, B> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMissing<K, A, B> MapLeft, WhenMatched<K, A, B, B> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, C> union <OrdK, K, A, B, C> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMissing<K, A, C> MapLeft, WhenMissing<K, B, C> MapRight, WhenMatched<K, A, B, C> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, R> intersect <OrdK, K, A, B, R> (Map<OrdK, K, A> left, Map<OrdK, K, B> right, WhenMatched<K, A, B, R> merge) Source #
method Map<OrdK, K, V> except <OrdK, K, V> (Map<OrdK, K, V> left, Map<OrdK, K, V> right) Source #
Map differencing based on key. this - other.
method Map<OrdK, K, V> symmetricExcept <OrdK, K, V> (Map<OrdK, K, V> left, Map<OrdK, K, V> right) Source #
Keys that are in both maps are dropped and the remaining items are merged and returned.
struct Map <OrdK, K, V> Source #
Immutable map AVL tree implementation AVL tree is a self-balancing binary search tree. wikipedia.org/wiki/AVL_tree
type | K | Key type |
type | V | Value type |
field Map<OrdK, K, V> Empty = new Map<OrdK, K, V>(MapInternal<OrdK, K, V>.Empty) Source #
Reference version for use in pattern-matching
Empty collection = null
Singleton collection = (K, V)
More = ((K, V), Seq<(K, V)>) -- head and tail
var res = list.Case switch
{
(var x, var xs) => ...,
A value => ...,
_ => ...
}
property IEnumerable<Tuple<K, V>> Tuples Source #
Enumerable of in-order tuples that make up the map
returns | Tuples |
property IEnumerable<(K Key, V Value)> ValueTuples Source #
Enumerable of in-order tuples that make up the map
returns | Tuples |
method Map<OrdK, K, V> Add (K key, V value) Source #
Atomically adds a new item to the map
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> TryAdd (K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, then the new item is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> TryAdd (K key, V value, Func<Map<OrdK, K, V>, V, Map<OrdK, K, V>> Fail) Source #
Atomically adds a new item to the map. If the key already exists then the Fail handler is called with the unaltered map and the value already set for the key, it expects a new map returned.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
param | Fail | Delegate to handle failure, you're given the unaltered map and the value already set for the key |
returns | New Map with the item added |
method Map<OrdK, K, V> AddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> AddRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> TryAddRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> TryAddRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> TryAddRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're ignored.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<OrdK, K, V> AddOrUpdateRange (IEnumerable<Tuple<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> AddOrUpdateRange (IEnumerable<(K, V)> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of tuples to add |
returns | New Map with the items added |
method Map<OrdK, K, V> AddOrUpdateRange (IEnumerable<KeyValuePair<K, V>> range) Source #
Atomically adds a range of items to the map. If any of the keys exist already then they're replaced.
Null is not allowed for a Key or a Value
param | range | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<OrdK, K, V> Remove (K key) Source #
Atomically removes an item from the map If the key doesn't exists, the request is ignored.
param | key | Key |
returns | New map with the item removed |
method Option<V> Find (K key) Source #
Retrieve a value from the map by key
param | key | Key to find |
returns | Found value |
method IEnumerable<V> FindSeq (K key) Source #
Retrieve a value from the map by key as an enumerable
param | key | Key to find |
returns | Found value |
method R Find <R> (K key, Func<V, R> Some, Func<R> None) Source #
Retrieve a value from the map by key and pattern match the result.
param | key | Key to find |
returns | Found value |
method Option<(K Key, V Value)> FindPredecessor (K key) Source #
Retrieve the value from previous item to specified key
param | key | Key to find |
returns | Found key/value |
method Option<(K Key, V Value)> FindExactOrPredecessor (K key) Source #
Retrieve the value from exact key, or if not found, the previous item
param | key | Key to find |
returns | Found key/value |
method Option<(K Key, V Value)> FindSuccessor (K key) Source #
Retrieve the value from next item to specified key
param | key | Key to find |
returns | Found key/value |
method Option<(K Key, V Value)> FindExactOrSuccessor (K key) Source #
Retrieve the value from exact key, or if not found, the next item
param | key | Key to find |
returns | Found key/value |
method (Map<OrdK, K, V> Map, V Value) FindOrAdd (K key, Func<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (Map<OrdK, K, V>, V Value) FindOrAdd (K key, V value) Source #
Try to find the key in the map, if it doesn't exist, add a new item provided.
param | key | Key to find |
param | value | Delegate to get the value |
returns | Updated map and added value |
method (Map<OrdK, K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Func<Option<V>> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method (Map<OrdK, K, V> Map, Option<V> Value) FindOrMaybeAdd (K key, Option<V> None) Source #
Try to find the key in the map, if it doesn't exist, add a new item by invoking the delegate provided.
param | key | Key to find |
param | None | Delegate to get the value |
returns | Updated map and added value |
method Map<OrdK, K, V> SetItem (K key, V value) Source #
Atomically updates an existing item
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> SetItem (K key, Func<V, V> Some) Source #
Retrieve a value from the map by key, map it to a new value, put it back.
param | key | Key to set |
returns | New map with the mapped value |
method Map<OrdK, K, V> TrySetItem (K key, V value) Source #
Atomically updates an existing item, unless it doesn't exist, in which case it is ignored
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> TrySetItem (K key, Func<V, V> Some) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Silently fails if the value doesn't exist
param | key | Key to set |
param | Some | delegate to map the existing value to a new one before setting |
returns | New map with the item set |
method Map<OrdK, K, V> TrySetItem (K key, Func<V, V> Some, Func<Map<K, V>, Map<K, V>> None) Source #
Atomically sets an item by first retrieving it, applying a map, and then putting it back. Calls the None delegate to return a new map if the item can't be found
Null is not allowed for a Key or a Value
param | key | Key |
param | Some | delegate to map the existing value to a new one before setting |
param | None | delegate to return a new map if the item can't be found |
returns | New map with the item set |
method Map<OrdK, K, V> AddOrUpdate (K key, V value) Source #
Atomically adds a new item to the map. If the key already exists, the new item replaces it.
Null is not allowed for a Key or a Value
param | key | Key |
param | value | Value |
returns | New Map with the item added |
method Map<OrdK, K, V> AddOrUpdate (K key, Func<V, V> Some, Func<V> None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method Map<OrdK, K, V> AddOrUpdate (K key, Func<V, V> Some, V None) Source #
Retrieve a value from the map by key, map it to a new value, put it back. If it doesn't exist, add a new one based on None result.
param | key | Key to find |
returns | New map with the mapped value |
method IEnumerable<V> FindRange (K keyFrom, K keyTo) Source #
Retrieve a range of values
param | keyFrom | Range start (inclusive) |
param | keyTo | Range to (inclusive) |
returns | Range of values |
method IEnumerable<(K Key, V Value)> FindRangePairs (K keyFrom, K keyTo) Source #
Retrieve a range of values
param | keyFrom | Range start (inclusive) |
param | keyTo | Range to (inclusive) |
returns | Range of values |
method IEnumerable<(K Key, V Value)> Skip (int amount) Source #
Skips 'amount' values and returns a new tree without the skipped values.
param | amount | Amount to skip |
returns | New tree |
method bool ContainsKey (K key) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method bool Contains (K key, V value) Source #
Checks for existence of a key in the map
param | key | Key to check |
returns | True if an item with the key supplied is in the map |
method Map<OrdK, K, V> Clear () Source #
Clears all items from the map
Functionally equivalent to calling Map.empty as the original structure is untouched
returns | Empty map |
method Map<OrdK, K, V> AddRange (IEnumerable<KeyValuePair<K, V>> pairs) Source #
Atomically adds a range of items to the map
param | pairs | Range of KeyValuePairs to add |
returns | New Map with the items added |
method Map<OrdK, K, V> SetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> SetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> SetItems (IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> TrySetItems (IEnumerable<KeyValuePair<K, V>> items) Source #
Atomically sets a series of items using the KeyValuePairs provided. If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> TrySetItems (IEnumerable<Tuple<K, V>> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> TrySetItems (IEnumerable<(K, V)> items) Source #
Atomically sets a series of items using the Tuples provided If any of the items don't exist then they're silently ignored.
param | items | Items to set |
returns | New map with the items set |
method Map<OrdK, K, V> TrySetItems (IEnumerable<K> keys, Func<V, V> Some) Source #
Atomically sets a series of items using the keys provided to find the items and the Some delegate maps to a new value. If the items don't exist then they're silently ignored.
param | keys | Keys of items to set |
param | Some | Function map the existing item to a new one |
returns | New map with the items set |
method Map<OrdK, K, V> RemoveRange (IEnumerable<K> keys) Source #
Atomically removes a set of keys from the map
param | keys | Keys to remove |
returns | New map with the items removed |
method bool Contains (KeyValuePair<K, V> pair) Source #
Returns true if a Key/Value pair exists in the map
param | pair | Pair to find |
returns | True if exists, false otherwise |
method IReadOnlyDictionary<K, V> ToDictionary () Source #
Convert the map to an IReadOnlyDictionary<K, V>
returns |
method IDictionary<KR, VR> ToDictionary <KR, VR> (Func<(K Key, V Value), KR> keySelector, Func<(K Key, V Value), VR> valueSelector) Source #
Map the map the a dictionary
method IReadOnlyDictionary<K, V> ToReadOnlyDictionary () Source #
Get a IReadOnlyDictionary for this map. No mapping is required, so this is very fast.
method IEnumerator<(K Key, V Value)> GetEnumerator () Source #
GetEnumerator - IEnumerable interface
method string ToString () Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
The elipsis is used for collections over 50 items
To get a formatted string with all the items, use ToFullString
or ToFullArrayString
.
method string ToFullString (string separator = ", ") Source #
Format the collection as (key: value), (key: value), (key: value), ...
method string ToFullArrayString (string separator = ", ") Source #
Format the collection as [(key: value), (key: value), (key: value), ...]
method IEnumerable<(K Key, V Value)> AsEnumerable () Source #
method bool Equals (object obj) Source #
Equality of keys and values with EqDefault<V>
used for values
method bool Equals (Map<OrdK, K, V> y) Source #
Equality of keys and values with EqDefault<V>
used for values
method bool Equals <EqV> (Map<OrdK, K, V> y) Source #
Equality of keys and values
method bool EqualsKeys (Map<OrdK, K, V> y) Source #
Equality of keys only
method int GetHashCode () Source #
method Map<OrdK, K, V> Do (Action<V> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method Map<OrdK, K, U> Select <U> (Func<V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<OrdK, K, U> Select <U> (Func<K, V, U> mapper) Source #
Atomically maps the map to a new map
returns | Mapped items in a new map |
method Map<OrdK, K, V> Where (Func<V, bool> valuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | valuePred | Predicate |
returns | New map with items filtered |
method Map<OrdK, K, V> Where (Func<K, V, bool> keyValuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | keyValuePred | Predicate |
returns | New map with items filtered |
method Map<OrdK, K, V> Filter (Func<V, bool> valuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | valuePred | Predicate |
returns | New map with items filtered |
method Map<OrdK, K, V> Filter (Func<K, V, bool> keyValuePred) Source #
Atomically filter out items that return false when a predicate is applied
param | keyValuePred | Predicate |
returns | New map with items filtered |
method bool ForAll (Func<K, V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<Tuple<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<(K Key, V Value), bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool ForAll (Func<V, bool> pred) Source #
Return true if all items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<K, V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<Tuple<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<(K, V), bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<KeyValuePair<K, V>, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method bool Exists (Func<V, bool> pred) Source #
Return true if any items in the map return true when the predicate is applied
param | pred | Predicate |
returns | True if all items in the map return true when the predicate is applied |
method Unit Iter (Action<K, V> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<V> action) Source #
Atomically iterate through all values in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<Tuple<K, V>> action) Source #
Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<(K, V)> action) Source #
Atomically iterate through all key/value pairs (as tuples) in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Unit Iter (Action<KeyValuePair<K, V>> action) Source #
Atomically iterate through all key/value pairs in the map (in order) and execute an action on each
param | action | Action to execute |
returns | Unit |
method Map<OrdK, K, U> Choose <U> (Func<K, V, Option<U>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method Map<OrdK, K, U> Choose <U> (Func<V, Option<U>> selector) Source #
Equivalent to map and filter but the filtering is done based on whether the returned Option is Some or None. If the item is None then it's filtered out, if not the the mapped Some value is used.
param | selector | Predicate |
returns | Filtered map |
method S Fold <S> (S state, Func<S, K, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method S Fold <S> (S state, Func<S, V, S> folder) Source #
Atomically folds all items in the map (in order) using the folder function provided.
type | S | State type |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method Map<OrdK, K, V> Union (Map<OrdK, K, V> other, WhenMatched<K, V, V, V> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, V> Union <V2> (Map<OrdK, K, V2> other, WhenMissing<K, V2, V> MapRight, WhenMatched<K, V, V2, V> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, V2> Union <V2> (Map<OrdK, K, V2> other, WhenMissing<K, V, V2> MapLeft, WhenMatched<K, V, V2, V2> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, R> Union <V2, R> (Map<OrdK, K, V2> other, WhenMissing<K, V, R> MapLeft, WhenMissing<K, V2, R> MapRight, WhenMatched<K, V, V2, R> Merge) Source #
Union two maps. The merge function is called keys are present in both map.
method Map<OrdK, K, R> Intersect <V2, R> (Map<OrdK, K, V2> other, WhenMatched<K, V, V2, R> Merge) Source #
method Map<OrdK, K, V> Except (Map<OrdK, K, V> other) Source #
Map differencing based on key. this - other.
method Map<OrdK, K, V> SymmetricExcept (Map<OrdK, K, V> other) Source #
Keys that are in both maps are dropped and the remaining items are merged and returned.
method int CompareTo (Map<OrdK, K, V> other) Source #
Compare keys and values (values use OrdDefault<V>
for ordering)
method int CompareTo <OrdV> (Map<OrdK, K, V> other) Source #
Compare keys and values (values use OrdV
for ordering)
method int CompareKeysTo (Map<OrdK, K, V> other) Source #
Compare keys only