<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Clojure Golf episode 1</title>
	<atom:link href="http://blog.fogus.me/2009/08/14/clojure-golf-episode-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fogus.me/2009/08/14/clojure-golf-episode-1/</link>
	<description>λ λ λ</description>
	<lastBuildDate>Sun, 29 Jan 2012 10:17:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Saptarshi</title>
		<link>http://blog.fogus.me/2009/08/14/clojure-golf-episode-1/comment-page-1/#comment-15551</link>
		<dc:creator>Saptarshi</dc:creator>
		<pubDate>Wed, 24 Mar 2010 16:34:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fogus.me/?p=1951#comment-15551</guid>
		<description>&lt;p&gt;Hello,
I apologize for the repeated posts, this the last one for sure. A bit more space efficient:&lt;/p&gt;

&lt;p&gt;filter.collecting &lt;- function(predicate, collector,...){&lt;/p&gt;

&lt;p&gt;z &lt;- mapply(function(...) if(do.call(predicate,list(...))) do.call(collector,list(...))
         ,...,SIMPLIFY=TRUE);&lt;/p&gt;

&lt;p&gt;Filter(function(r) !is.null(r), z);&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;filter.collecting(&#039;&lt;&#039;,&#039;+&#039;, c(1,7,3,9),c(5,5,5,5));&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello,
I apologize for the repeated posts, this the last one for sure. A bit more space efficient:</p>

<p>filter.collecting &lt;- function(predicate, collector,&#8230;){</p>

<p>z &lt;- mapply(function(&#8230;) if(do.call(predicate,list(&#8230;))) do.call(collector,list(&#8230;))
         ,&#8230;,SIMPLIFY=TRUE);</p>

<p>Filter(function(r) !is.null(r), z);</p>

<p>}</p>

<p>filter.collecting(&#8216;&lt;&#8217;,'+&#8217;, c(1,7,3,9),c(5,5,5,5));</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Saptarshi</title>
		<link>http://blog.fogus.me/2009/08/14/clojure-golf-episode-1/comment-page-1/#comment-15549</link>
		<dc:creator>Saptarshi</dc:creator>
		<pubDate>Wed, 24 Mar 2010 16:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fogus.me/?p=1951#comment-15549</guid>
		<description>&lt;p&gt;Oops, the newlines disappeared, here it is again
filter.collecting  &lt;- function(predicate, collector, ...){&lt;/p&gt;

&lt;p&gt;w &lt;- which(mapply(predicate, ...))&lt;/p&gt;

&lt;p&gt;newl &lt;- lapply(list(...),function(r) r[w])&lt;/p&gt;

&lt;p&gt;newl$FUN &lt;- collector&lt;/p&gt;

&lt;p&gt;do.call(&quot;mapply&quot;,newl)&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;usage ::&lt;/p&gt;

&lt;p&gt;filter.collecting(&quot;&lt;&quot;,&quot;+&quot;, c(1,7,3,9),c(5,5,5,5))&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oops, the newlines disappeared, here it is again
filter.collecting  &lt;- function(predicate, collector, &#8230;){</p>

<p>w &lt;- which(mapply(predicate, &#8230;))</p>

<p>newl &lt;- lapply(list(&#8230;),function(r) r[w])</p>

<p>newl$FUN &lt;- collector</p>

<p>do.call(&#8220;mapply&#8221;,newl)</p>

<p>}</p>

<p>usage ::</p>

<p>filter.collecting(&#8220;&lt;&#8221;,&#8221;+&#8221;, c(1,7,3,9),c(5,5,5,5))</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Saptarshi</title>
		<link>http://blog.fogus.me/2009/08/14/clojure-golf-episode-1/comment-page-1/#comment-15548</link>
		<dc:creator>Saptarshi</dc:creator>
		<pubDate>Wed, 24 Mar 2010 16:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fogus.me/?p=1951#comment-15548</guid>
		<description>&lt;p&gt;Rather later in the day, but for the R language:&lt;/p&gt;

&lt;p&gt;filter.collecting  &lt;- function(predicate, collector, ...){
  w &lt;- which(mapply(predicate, ...))
  newl &lt;- lapply(list(...),function(r) r[w])
  newl$FUN &lt;- collector
  do.call(&quot;mapply&quot;,newl)
}&lt;/p&gt;

&lt;p&gt;usage ::&lt;/p&gt;

&lt;p&gt;filter.collecting(&quot;&lt;&quot;,&quot;+&quot;, c(1,7,3,9),c(5,5,5,5))&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Rather later in the day, but for the R language:</p>

<p>filter.collecting  &lt;- function(predicate, collector, &#8230;){
  w &lt;- which(mapply(predicate, &#8230;))
  newl &lt;- lapply(list(&#8230;),function(r) r[w])
  newl$FUN &lt;- collector
  do.call(&#8220;mapply&#8221;,newl)
}</p>

<p>usage ::</p>

<p>filter.collecting(&#8220;&lt;&#8221;,&#8221;+&#8221;, c(1,7,3,9),c(5,5,5,5))</p>]]></content:encoded>
	</item>
	<item>
		<title>By: fogus</title>
		<link>http://blog.fogus.me/2009/08/14/clojure-golf-episode-1/comment-page-1/#comment-10103</link>
		<dc:creator>fogus</dc:creator>
		<pubDate>Mon, 24 Aug 2009 17:40:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fogus.me/?p=1951#comment-10103</guid>
		<description>&lt;p&gt;@Ronen,&lt;/p&gt;

&lt;p&gt;Thanks for the snippet(s). I tend to like your second solution the best for the same reason that I like Grand&#039;s -- it tells the story of its functionality.  The next step would be to lose your heads.  ;)

I agree with all of your comments and it goes to show that although Clojure can quite easily be translated directly from Scheme, that approach is not likely to yield idiomatic results.&lt;/p&gt;

&lt;p&gt;-m&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Ronen,</p>

<p>Thanks for the snippet(s). I tend to like your second solution the best for the same reason that I like Grand&#8217;s &#8212; it tells the story of its functionality.  The next step would be to lose your heads.  ;)

I agree with all of your comments and it goes to show that although Clojure can quite easily be translated directly from Scheme, that approach is not likely to yield idiomatic results.</p>

<p>-m</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Normand</title>
		<link>http://blog.fogus.me/2009/08/14/clojure-golf-episode-1/comment-page-1/#comment-9888</link>
		<dc:creator>Eric Normand</dc:creator>
		<pubDate>Mon, 17 Aug 2009 15:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fogus.me/?p=1951#comment-9888</guid>
		<description>&lt;p&gt;It&#039;s a pretty simple function.&lt;/p&gt;

&lt;p&gt;http://gist.github.com/169171&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It&#8217;s a pretty simple function.</p>

<p><a href="http://gist.github.com/169171" rel="nofollow">http://gist.github.com/169171</a></p>]]></content:encoded>
	</item>
</channel>
</rss>

