cairo_lang_utils::collection_arithmetics

Function sub_maps

Source
pub fn sub_maps<Key: Hash + Eq, Value: HasZero + Sub<Output = Value> + Clone + Eq, Rhs: IntoIterator<Item = (Key, Value)>, BH: BuildHasher>(
    lhs: OrderedHashMap<Key, Value, BH>,
    rhs: Rhs,
) -> OrderedHashMap<Key, Value, BH>
Expand description

Returns a map which contains the difference of the values from the given two maps, for each key.

If the key is missing from one of them, it is treated as zero.