ITADN

Provide an OR expression evaluator

#1719Openkumarshantanu 创建于 2025-03-27
K
kumarshantanucommented
This is a feature request for a concise OR expression evaluator. Consider the following Clojure function that picks the non-empty value from a map for the keys `:description` or `:short_description`: ```clojure (defn take-description [m] (let [f (fn [k] (let [v (get m k)] (when (seq v) v)))] (or (f :description) (f :short_description) ""))) ``` It should be possible to express something like in a dataflow.
0 条评论