FpdartOnMap<K, V> extension

Functional programming functions on a mutable dart Map using fpdart.

on

Properties

size int

Available on Map<K, V>, provided by the FpdartOnMap extension

Return number of elements in the Map (keys.length).
no setter

Methods

collect<A>(Order<K> order, A compose(K key, V value)) Iterable<A>

Available on Map<K, V>, provided by the FpdartOnMap extension

Collect all the entries in this Map into an Iterable using compose, with the values ordered using order.
deleteAt(Eq<K> eq, K key) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Delete entry at given key if present in the Map and return updated Map.
difference(Eq<K> eq, Map<K, V> map) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Remove from this Map all the elements that have key contained in the given map.
extract<T>(K key) Option<T>

Available on Map<K, V>, provided by the FpdartOnMap extension

Return an Option that conditionally accesses map keys, only if they match the given type.
extractMap(K key) Option<Map<K, dynamic>>

Available on Map<K, V>, provided by the FpdartOnMap extension

Return an Option that conditionally accesses map keys if they contain a value with a Map value.
filter(bool test(V value)) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Returns a new Map containing all the elements of this Map where the value satisfies test.
filterWithIndex(bool test(V value, int index)) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Returns a new Map containing all the elements of this Map where the value satisfies test.
filterWithKey(bool test(K key, V value)) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Returns a new Map containing all the elements of this Map where key/value satisfies test.
filterWithKeyAndIndex(bool test(K key, V value, int index)) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Returns a new Map containing all the elements of this Map where key/value satisfies test.
foldLeft<A>(Order<K> order, A initial, A compose(A acc, V value)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on order on their key, and return the result of combining all the intermediate values.
foldLeftWithIndex<A>(Order<K> order, A initial, A compose(A acc, V value, int index)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on order on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values.
foldLeftWithKey<A>(Order<K> order, A initial, A compose(A acc, K key, V value)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on order on their key, and return the result of combining all the intermediate values.
foldLeftWithKeyAndIndex<A>(Order<K> order, A initial, A compose(A acc, K key, V value, int index)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on order on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values.
foldRight<A>(Order<K> order, A initial, A compose(V value, A acc)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on the inverse of order on their key, and return the result of combining all the intermediate values.
foldRightWithIndex<A>(Order<K> order, A initial, A compose(V value, A acc, int index)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on the inverse of order on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values.
foldRightWithKey<A>(Order<K> order, A initial, A compose(K key, V value, A acc)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on the inverse of order on their key, and return the result of combining all the intermediate values.
foldRightWithKeyAndIndex<A>(Order<K> order, A initial, A compose(K key, V value, A acc, int index)) → A

Available on Map<K, V>, provided by the FpdartOnMap extension

Apply compose to all the values of this Map sorted based on the inverse of order on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values.
intersection(Eq<K> eq, V combine(V x, V y), Map<K, V> map) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Intersect the key/value of two Map using combine where the key is the same.
isSubmap(Eq<K> eqK, Eq<V> eqV, Map<K, V> map) bool

Available on Map<K, V>, provided by the FpdartOnMap extension

Test whether or not the given map contains all of the keys and values contained in this Map.
lookup(K key) Option<V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Get the value at given key if present, otherwise return None.
lookupEq(Eq<K> eq, K key) Option<V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Get the value at given key if present using eq, otherwise return None.
lookupKeyEq(Eq<K> eq, K key) Option<K>

Available on Map<K, V>, provided by the FpdartOnMap extension

Get the key equal to key if present, otherwise return None.
lookupWithKey(K key) Option<(K, V)>

Available on Map<K, V>, provided by the FpdartOnMap extension

Get the value and key at given key if present, otherwise return None.
lookupWithKeyEq(Eq<K> eq, K key) Option<(K, V)>

Available on Map<K, V>, provided by the FpdartOnMap extension

Get the value and key at given key if present using eq, otherwise return None.
mapValue<A>(A update(V value)) Map<K, A>

Available on Map<K, V>, provided by the FpdartOnMap extension

Convert each value of the Map using the update function and returns a new Map.
mapWithIndex<A>(A update(V value, int index)) Map<K, A>

Available on Map<K, V>, provided by the FpdartOnMap extension

Convert each value of the Map using the update function and returns a new Map.
modifyAt(Eq<K> eq, V update(V value), K key) Option<Map<K, V>>

Available on Map<K, V>, provided by the FpdartOnMap extension

If the given key is present in the Map, then modify its value using update and return the Map.
modifyAtIfPresent(Eq<K> eq, V update(V value), K key) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

If the given key is present in the Map, then modify its value using update and return a the new Map.
pop(Eq<K> eq, K key) Option<(V, Map<K, V>)>

Available on Map<K, V>, provided by the FpdartOnMap extension

Delete a key and value from a this Map, returning the deleted value as well as the updated Map.
toSortedList(Order<K> order) List<MapEntry<K, V>>

Available on Map<K, V>, provided by the FpdartOnMap extension

Get a sorted List of the key/value pairs contained in this Map based on order on keys.
union(Eq<K> eq, V combine(V x, V y), Map<K, V> map) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Combine the key/value of this Map and map using combine where the key is the same.
updateAt(Eq<K> eq, K key, V value) Option<Map<K, V>>

Available on Map<K, V>, provided by the FpdartOnMap extension

If the given key is present in the Map, then update its value to value.
updateAtIfPresent(Eq<K> eq, K key, V value) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

If the given key is present in the Map, then update its value to value. Otherwise, return a copy of the original unmodified Map.
upsertAt(Eq<K> eq, K key, V value) Map<K, V>

Available on Map<K, V>, provided by the FpdartOnMap extension

Insert or replace a key/value pair in a Map.