<!-- 
RSS generated by JIRA (4.4#649-r158309) at Wed May 22 16:25:33 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CLJ-1170/CLJ-1170.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-1170] conj-ing x on equal values should produce equal results</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1170</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;I&apos;ve recently have run into a WHAT behavior here is an example:&lt;/p&gt;

&lt;p&gt;```clojure&lt;br/&gt;
(def head 1)&lt;br/&gt;
(def tail &lt;span class=&quot;error&quot;&gt;&amp;#91;2 3&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;(= tail (rest (cons head tail)))  ; true&lt;/p&gt;

&lt;p&gt;;; Types don&apos;t really match but close enough I guess &lt;br/&gt;
(type tail)                       ; clojure.lang.PersistentVector&lt;br/&gt;
(vector? tail)                    ; true&lt;br/&gt;
(type (rest (cons head tail)))    ; clojure.lang.PersistentVector$ChunkedSeq&lt;br/&gt;
(vector? (rest (cons head tail))) ; false&lt;/p&gt;

&lt;p&gt;;; Bet then it get&apos;s ugly (I would expect them to be equal)&lt;br/&gt;
(= (conj tail :x) (conj (rest (cons head tail)) :x))  ; false&lt;/p&gt;

&lt;p&gt;;; Because&lt;br/&gt;
(conj tail :x) ; &lt;span class=&quot;error&quot;&gt;&amp;#91;2 3 :x&amp;#93;&lt;/span&gt;&lt;br/&gt;
(conj (rest (cons head tail)) :x) ;(:x 2 3)&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;This brings me to a pretty surprising behavior, which is conj-ing&lt;br/&gt;
equal values produce non-equal results:&lt;/p&gt;

&lt;p&gt;```clojure&lt;br/&gt;
(= &apos;(2 3) &lt;span class=&quot;error&quot;&gt;&amp;#91;2 3&amp;#93;&lt;/span&gt;) ; true&lt;br/&gt;
(= (conj &apos;(2 3) 1) (conj &lt;span class=&quot;error&quot;&gt;&amp;#91;2 3&amp;#93;&lt;/span&gt; 1))&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;I think conj should either produce equal results or list and vectors with&lt;br/&gt;
same elements should not be equal. That would also resolve a previous&lt;br/&gt;
problem, although intuitively I would expect `(rest (cons x y))` to&lt;br/&gt;
return `y` back.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16026">CLJ-1170</key>
            <summary>conj-ing x on equal values should produce equal results</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="gozala">Irakli Gozalishvili</reporter>
                        <labels>
                    </labels>
                <created>Sat, 23 Feb 2013 22:27:37 -0600</created>
                <updated>Fri, 1 Mar 2013 10:04:40 -0600</updated>
                    <resolved>Fri, 1 Mar 2013 10:04:40 -0600</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30648" author="jafingerhut" created="Sun, 24 Feb 2013 10:46:21 -0600"  >&lt;p&gt;Irakli, it is an explicitly documented feature that conj puts new items in different places for lists (at the beginning) and vectors (at the end).  rest is explicitly documented to call seq on its argument.  See their doc strings.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if it is explicitly documented, or just long-standing practice, that vectors and seqs with the the same sequence of values in them are equal.  I think that a lot of existing code would break if Clojure changed so those were not equal.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>