diff --git a/src/rss_thread_watch/utils.clj b/src/rss_thread_watch/utils.clj index 0de1280..0781220 100644 --- a/src/rss_thread_watch/utils.clj +++ b/src/rss_thread_watch/utils.clj @@ -68,3 +68,11 @@ (map? default-val)) ; If only one is, we don't care cus then it's just assigment {k (map-apply-defaults conf-val default-val)} {k (nil?-else conf-val default-val)}))))) + +(defn fmap [f m] + "Applies function [f] to every key and value in map [m] + Function signature should be (f [key value])." + (into + (empty m) + (for [[key val] m] + [key (f key val)])))