<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged :select</title>
<link>https://ask.clojure.org/index.php/tag/%3Aselect</link>
<description>Powered by Question2Answer</description>
<item>
<title>Should :select turn a non-map value into {}?</title>
<link>https://ask.clojure.org/index.php/15277/should-select-turn-a-non-map-value-into</link>
<description>&lt;pre&gt;&lt;code&gt;(def select-c (selector {{:keys [a]} :c :select s}))

(select-c {})
;; =&amp;gt; {}

(select-c {:c nil})
;; =&amp;gt; {:c nil}

(select-c {:c 1})
;; =&amp;gt; {:c {}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;{}&lt;/code&gt; is not in the input.&lt;br&gt;
The docs say &lt;code&gt;:select&lt;/code&gt; gives &quot;a subset of the input map&quot;.&lt;br&gt;
I would expect one of these:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; keep it: copy the value as is, like nil
(select-c {:c 1})
;; =&amp;gt; {:c 1}

;; drop it: not a map, so not selected
(select-c {:c 1})
;; =&amp;gt; {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is &lt;code&gt;{:c {}}&lt;/code&gt; intended?&lt;/p&gt;
&lt;p&gt;Reproduced on Clojure 1.13.0-alpha10.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15277/should-select-turn-a-non-map-value-into</guid>
<pubDate>Mon, 26 Oct 2026 10:20:16 +0000</pubDate>
</item>
</channel>
</rss>