<!-- 
RSS generated by JIRA (4.4#649-r158309) at Tue May 21 17:22:57 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-1145/CLJ-1145.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-1145] thread-last can&apos;t accept 0 or 1 forms, thread-first can&apos;t accept 0 forms</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1145</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;At times, as the artifact of repl experimentation or a refactoring in progress, one wants to eval a threaded form with 1 or (less likely) 0 arguments.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;(-&amp;gt; 42) ; fine&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;(-&lt;del&gt;&amp;gt;&amp;gt; 42) ; throws &quot;ArityException Wrong number of args (1) passed to: core$&lt;/del&gt;-GT&quot;.&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;(-&amp;gt;) ; throws &quot;ArityException Wrong number of args (0) passed to: core$&quot; (sic)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;(-&lt;del&gt;&amp;gt;&amp;gt;) ; throws &quot;ArityException Wrong number of args (0) passed to: core$&lt;/del&gt;-GT&quot;.&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Apologies for the text rendering (how to cite code?).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15959">CLJ-1145</key>
            <summary>thread-last can&apos;t accept 0 or 1 forms, thread-first can&apos;t accept 0 forms</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="vemv">V&#237;ctor M. Valenzuela</reporter>
                        <labels>
                    </labels>
                <created>Sat, 12 Jan 2013 14:06:42 -0600</created>
                <updated>Sun, 13 Jan 2013 09:40:39 -0600</updated>
                    <resolved>Sun, 13 Jan 2013 09:40:39 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30425" author="jafingerhut" created="Sat, 12 Jan 2013 15:29:31 -0600"  >&lt;p&gt;Is this a duplicate with &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1086&quot; title=&quot;Support arity-1 for -&amp;gt;&amp;gt;&quot;&gt;CLJ-1086&lt;/a&gt;, &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1121&quot; title=&quot;-&amp;gt; and -&amp;gt;&amp;gt; have unexpected behavior when combined with unusual macros&quot;&gt;CLJ-1121&lt;/a&gt;, or the combination of those two?&lt;/p&gt;

&lt;p&gt;If arity 0 is a new aspect of this ticket, what would you expect the arity 0 versions to be transformed into?  nil?&lt;/p&gt;</comment>
                    <comment id="30426" author="vemv" created="Sat, 12 Jan 2013 18:46:37 -0600"  >&lt;p&gt;Surely a duplicate - but Jira&apos;s search couldn&apos;t find those! (used &quot;-&amp;gt;&quot;, &quot;thread-last&quot; etc as search queries).&lt;/p&gt;

&lt;p&gt;While fairly unlikely to use / noisy to implement, the thing about feeding 0-arities to the threading macros is that they throw in exchange an unrelated exception rather than e.g. &quot;ArityException Wrong number of args (0) passed to: core$-&amp;gt;&quot;.&lt;/p&gt;

&lt;p&gt;Don&apos;t know if this is simply how macros (can) work, but it called my attention.&lt;/p&gt;

&lt;p&gt;Feel free to close my issue.&lt;/p&gt;</comment>
                    <comment id="30428" author="jafingerhut" created="Sun, 13 Jan 2013 09:25:23 -0600"  >&lt;p&gt;I will go ahead and close this case as a duplicate.  FYI, below is the behavior if the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1121&quot; title=&quot;-&amp;gt; and -&amp;gt;&amp;gt; have unexpected behavior when combined with unusual macros&quot;&gt;CLJ-1121&lt;/a&gt; patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1121&quot; title=&quot;-&amp;gt; and -&amp;gt;&amp;gt; have unexpected behavior when combined with unusual macros&quot;&gt;CLJ-1121&lt;/a&gt;-v002.patch and the &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1083&quot; title=&quot;Incorrect ArityException message for function names containing -&amp;gt;&quot;&gt;CLJ-1083&lt;/a&gt; patch &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1083&quot; title=&quot;Incorrect ArityException message for function names containing -&amp;gt;&quot;&gt;CLJ-1083&lt;/a&gt;-attachments/better-throw-arity-messages.diff are both applied (the second one improves the error message in the 0-arity case):&lt;/p&gt;

&lt;p&gt;Clojure 1.5.0-master-SNAPSHOT&lt;br/&gt;
user=&amp;gt; (-&amp;gt;)&lt;br/&gt;
ArityException Wrong number of args (0) passed to: core/-&amp;gt;  clojure.lang.Compiler.macroexpand1 (Compiler.java:6472)&lt;br/&gt;
user=&amp;gt; (-&amp;gt; 5)&lt;br/&gt;
5&lt;br/&gt;
user=&amp;gt; (-&amp;gt;&amp;gt;)&lt;br/&gt;
ArityException Wrong number of args (0) passed to: core/-&amp;gt;&amp;gt;  clojure.lang.Compiler.macroexpand1 (Compiler.java:6472)&lt;br/&gt;
user=&amp;gt; (-&amp;gt;&amp;gt; 5)&lt;br/&gt;
5&lt;/p&gt;</comment>
                    <comment id="30429" author="jafingerhut" created="Sun, 13 Jan 2013 09:40:39 -0600"  >&lt;p&gt;The issue of a poor error message with 0-arity threading macros is improved by the patch attached to ticket &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1083&quot; title=&quot;Incorrect ArityException message for function names containing -&amp;gt;&quot;&gt;CLJ-1083&lt;/a&gt;, and adding handling of the 1-arity case is improved by the patch attached to ticket &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1121&quot; title=&quot;-&amp;gt; and -&amp;gt;&amp;gt; have unexpected behavior when combined with unusual macros&quot;&gt;CLJ-1121&lt;/a&gt;.&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>