The other answers are good if niland falseare not included in the number of possible values. If they are, you can use something like
(if-let [e (some (partial find relatives)
[:self :north :west :east :south])]
(val e)
:no-key-found)
eg.
(if-let [e (some (partial find relatives)
[:self :north :west :east :south])]
(val e)
:no-key-found)
; => false
(if-let [e (some (partial find {})
[:self :north :west :east :south])]
(val e)
:no-key-found)
; => :no-key-found
source
share