/// <summary> /// 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. /// </summary> /// <param name="keys">Keys of items to set</param> /// <param name="Some">Function map the existing item to a new one</param> /// <returns>New map with the items set</returns> public static Map <K, V> trySetItems <K, V>(Map <K, V> map, IEnumerable <K> keys, Func <V, V> Some) => map.TrySetItems(keys, Some);
/// <summary> /// Atomically sets a series of items using the KeyValuePairs provided. If any of the /// items don't exist then they're silently ignored. /// </summary> /// <param name="items">Items to set</param> /// <returns>New map with the items set</returns> public static Map <K, V> trySetItems <K, V>(Map <K, V> map, IEnumerable <KeyValuePair <K, V> > items) => map.TrySetItems(items);