You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 8, 2021. It is now read-only.
not really that important but the implementation of gets could be cleaner.
would make more sense to be implemented as
(defn gets
"Returns the first value mapped to key found in the provided maps."
[k & maps]
(->> (map #(get % k) maps)
(remove nil?)
first))
As you are mapping and filtering nil will never be returned meaning that the threading will continue (= (list) (some->> (map identity []))). If get is used then the call to first will either be a value or nil.
friend/src/cemerick/friend/util.clj
Line 4 in 12c5b66
not really that important but the implementation of
getscould be cleaner.would make more sense to be implemented as
As you are mapping and filtering
nilwill never be returned meaning that the threading will continue(= (list) (some->> (map identity []))). Ifgetis used then the call tofirstwill either be a value ornil.