<!-- 
RSS generated by JIRA (4.4#649-r158309) at Wed May 22 00:29:37 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-211/CLJ-211.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-211] Support arbitrary functional destructuring via -&gt; and -&gt;&gt;</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-211</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Support arbitrary functional destructuring, that is the use of&lt;br/&gt;
any function in any destructuring form to help unpack data in&lt;br/&gt;
arbitrary ways.&lt;/p&gt;

&lt;p&gt;The discussion began here:&lt;br/&gt;
&lt;a href=&quot;http://clojure-log.n01se.net/date/2009-11-17.html#09:31c&quot;&gt;http://clojure-log.n01se.net/date/2009-11-17.html#09:31c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The attached patch implements the spec described here:&lt;br/&gt;
&lt;a href=&quot;http://clojure-log.n01se.net/date/2009-11-17.html#10:50a&quot;&gt;http://clojure-log.n01se.net/date/2009-11-17.html#10:50a&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;That is, the following examples would now work:&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (let &lt;span class=&quot;error&quot;&gt;&amp;#91;(-&amp;gt; str a) 1&amp;#93;&lt;/span&gt; a)&lt;br/&gt;
&quot;1&quot;&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (let [&lt;span class=&quot;error&quot;&gt;&amp;#91;a (-&amp;gt; str b) c&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1 2&amp;#93;&lt;/span&gt;] (list a b c))&lt;br/&gt;
(1 &quot;2&quot; nil)&lt;/p&gt;

&lt;p&gt;user=&amp;gt; (let [(-&amp;gt;&amp;gt; (map int) &lt;span class=&quot;error&quot;&gt;&amp;#91;a b&amp;#93;&lt;/span&gt;) &quot;ab&quot;] (list a b))&lt;br/&gt;
(97 98)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13608">CLJ-211</key>
            <summary>Support arbitrary functional destructuring via -&gt; and -&gt;&gt;</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="3" iconUrl="http://dev.clojure.org/jira/images/icons/status_inprogress.gif">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="importer">Assembla Importer</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Nov 2009 10:43:00 -0600</created>
                <updated>Fri, 10 Dec 2010 08:49:03 -0600</updated>
                                                    <fixVersion>Approved Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="23273" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/211&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/211&lt;/a&gt;&lt;br/&gt;
Attachments:&lt;br/&gt;
destructuring-fns.diff - &lt;a href=&quot;https://www.assembla.com/spaces/clojure/documents/aHWQ_W06Kr3O89eJe5afGb/download/aHWQ_W06Kr3O89eJe5afGb&quot;&gt;https://www.assembla.com/spaces/clojure/documents/aHWQ_W06Kr3O89eJe5afGb/download/aHWQ_W06Kr3O89eJe5afGb&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="23274" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;chouser@n01se.net said: [&lt;a href=&quot;file:aHWQ_W06Kr3O89eJe5afGb&quot;&gt;file:aHWQ_W06Kr3O89eJe5afGb&lt;/a&gt;]: &lt;span class=&quot;error&quot;&gt;&amp;#91;PATCH&amp;#93;&lt;/span&gt; Support -&amp;gt; and -&amp;gt;&amp;gt; in destructuring forms.&lt;/p&gt;</comment>
                    <comment id="23275" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;cgrand said: I think the current patch suffers from the problem described here &lt;a href=&quot;http://groups.google.com/group/clojure-dev/msg/80ba7fad2ff04708&quot;&gt;http://groups.google.com/group/clojure-dev/msg/80ba7fad2ff04708&lt;/a&gt; too.&lt;/p&gt;</comment>
                    <comment id="23276" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;richhickey said: so, don&apos;t use syntax-quote, just use clojure.core/-&amp;gt;&lt;/p&gt;</comment>
                    <comment id="23277" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;chouser@n01se.net said: Only -&amp;gt; and -&amp;gt;&amp;gt; are actually legal here anyway &amp;#8211; if you&apos;ve locally bound foo to -&amp;gt; there&apos;s not really any good reason to think (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;(foo inc a)&amp;#93;&lt;/span&gt; a) should work.  And if you&apos;ve redefined -&amp;gt; or -&amp;gt;&amp;gt; to mean something else in your ns, do we need to catch that at compile time, or is it okay to emit the rearranged code and see what happens?&lt;/p&gt;

&lt;p&gt;In short, would &apos;#{&lt;del&gt;&amp;gt; -&amp;gt;&amp;gt; clojure.core/&lt;/del&gt;&amp;gt; clojure.core/-&amp;gt;&amp;gt;} be sufficient?&lt;/p&gt;</comment>
                    <comment id="23278" author="importer" created="Tue, 28 Sep 2010 06:57:00 -0500"  >&lt;p&gt;cgrand said: Only -&amp;gt; and -&amp;gt;&amp;gt; are legal here but what if they are aliased or shadowed? Instead of testing the symboil per se I would check, if:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the symbol is not in &amp;amp;env&lt;/li&gt;
	&lt;li&gt;the symbol resolve to #&apos;clojure.core/&lt;del&gt;&amp;gt; or  #&apos;clojure.core/&lt;/del&gt;&amp;gt;&amp;gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(when-not (&amp;amp;env (first b)) (#{#&apos;clojure.core/-&amp;gt; #&apos;clojure.core/-&amp;gt;&amp;gt;} (resolve (first b))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but it requires to change destructure&apos;s sig to pass the env around&lt;/p&gt;</comment>
                    <comment id="26002" author="stu" created="Fri, 3 Dec 2010 13:03:07 -0600"  >&lt;p&gt;Rich: Are you assigned to this by accident? If so, please deassign yourself.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10006">Incomplete</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>