<?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: Some notes about Clojure</title>
	<atom:link href="http://items.sjbach.com/16/some-notes-about-clojure/feed" rel="self" type="application/rss+xml" />
	<link>http://items.sjbach.com/16/some-notes-about-clojure</link>
	<description></description>
	<lastBuildDate>Fri, 19 Feb 2010 12:11:08 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tuple parameter unpacking in 3.x - Page 2 &#124; keyongtech</title>
		<link>http://items.sjbach.com/16/some-notes-about-clojure/comment-page-1#comment-1916</link>
		<dc:creator>Tuple parameter unpacking in 3.x - Page 2 &#124; keyongtech</dc:creator>
		<pubDate>Sun, 18 Jan 2009 16:49:18 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=16#comment-1916</guid>
		<description>[...] from scratch similar native pattern- matching features in CPython, like ones of Closure: http://items.sjbach.com/16/some-notes-about-clojure Or better ones of Scala, (or even OcaML, but those are static), etc, that avoid that pain and [...]</description>
		<content:encoded><![CDATA[<p>[...] from scratch similar native pattern- matching features in CPython, like ones of Closure: <a href="http://items.sjbach.com/16/some-notes-about-clojure" rel="nofollow">http://items.sjbach.com/16/some-notes-about-clojure</a> Or better ones of Scala, (or even OcaML, but those are static), etc, that avoid that pain and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suzy</title>
		<link>http://items.sjbach.com/16/some-notes-about-clojure/comment-page-1#comment-88</link>
		<dc:creator>Suzy</dc:creator>
		<pubDate>Mon, 24 Nov 2008 13:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=16#comment-88</guid>
		<description>Way, Way, over my head but I think it looks great!  Well done, Stevo.</description>
		<content:encoded><![CDATA[<p>Way, Way, over my head but I think it looks great!  Well done, Stevo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Virding</title>
		<link>http://items.sjbach.com/16/some-notes-about-clojure/comment-page-1#comment-8</link>
		<dc:creator>Robert Virding</dc:creator>
		<pubDate>Wed, 08 Oct 2008 07:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=16#comment-8</guid>
		<description>Coming from a pattern matching world the destructuring seems pretty simple, at least to what I am used to. Check out Lisp Flavoured Erlang (LFE) for a lisp example of more destructuring.</description>
		<content:encoded><![CDATA[<p>Coming from a pattern matching world the destructuring seems pretty simple, at least to what I am used to. Check out Lisp Flavoured Erlang (LFE) for a lisp example of more destructuring.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Bach</title>
		<link>http://items.sjbach.com/16/some-notes-about-clojure/comment-page-1#comment-7</link>
		<dc:creator>Stephen Bach</dc:creator>
		<pubDate>Tue, 07 Oct 2008 17:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=16#comment-7</guid>
		<description>Thanks mb.  Looks like &lt;code&gt;for&lt;/code&gt; is perhaps more a device for list comprehensions than iteration.</description>
		<content:encoded><![CDATA[<p>Thanks mb.  Looks like <code>for</code> is perhaps more a device for list comprehensions than iteration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mb</title>
		<link>http://items.sjbach.com/16/some-notes-about-clojure/comment-page-1#comment-6</link>
		<dc:creator>mb</dc:creator>
		<pubDate>Tue, 07 Oct 2008 17:39:37 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=16#comment-6</guid>
		<description>Some notes:

- anonymous fns support also variadic arguments: &lt;code&gt;#(apply str %&amp;)&lt;/code&gt;

- &lt;code&gt;for&lt;/code&gt; can do far more than just iterating:
&lt;pre&gt;
    (for [x [1 2 3 4 5 6] :while (&lt; x 3)
          y [1 2 3 4 5 6] :when (even? y)]
      [x y])
&lt;/pre&gt;
gives a (lazy) &lt;code&gt;([1 2] [1 4] [1 6] [2 2] [2 4] [2 6])&lt;/code&gt;.  It has nothing to do with for loops in other languages.  In particular it is not a way of doing things for side effects. That is what &lt;code&gt;doseq&lt;/code&gt; is supposed to do.</description>
		<content:encoded><![CDATA[<p>Some notes:</p>
<p>- anonymous fns support also variadic arguments: <code>#(apply str %&amp;)</code></p>
<p>- <code>for</code> can do far more than just iterating:</p>
<pre>
    (for [x [1 2 3 4 5 6] :while (&lt; x 3)
          y [1 2 3 4 5 6] :when (even? y)]
      [x y])
</pre>
<p>gives a (lazy) <code>([1 2] [1 4] [1 6] [2 2] [2 4] [2 6])</code>.  It has nothing to do with for loops in other languages.  In particular it is not a way of doing things for side effects. That is what <code>doseq</code> is supposed to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Bach</title>
		<link>http://items.sjbach.com/16/some-notes-about-clojure/comment-page-1#comment-5</link>
		<dc:creator>Stephen Bach</dc:creator>
		<pubDate>Tue, 07 Oct 2008 17:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=16#comment-5</guid>
		<description>Nice, I didn&#039;t know that functions were implicit &lt;code&gt;recur&lt;/code&gt; targets.  That&#039;s really smart.</description>
		<content:encoded><![CDATA[<p>Nice, I didn&#8217;t know that functions were implicit <code>recur</code> targets.  That&#8217;s really smart.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fogus</title>
		<link>http://items.sjbach.com/16/some-notes-about-clojure/comment-page-1#comment-4</link>
		<dc:creator>fogus</dc:creator>
		<pubDate>Tue, 07 Oct 2008 16:25:44 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=16#comment-4</guid>
		<description>RE: `(recur)`

You make it look &#039;more&#039; like recursion by making the recur target the enclosing `defn` instead.  That is:

&lt;pre&gt;
(defn member [x sq]
  (if (seq? sq)
    (if (= x (first sq))
      sq
      (recur x (rest sq)))))

(member &#039;a &#039;(1 2 3 a b c))
&lt;/pre&gt;

The power of `recur` comes from the fact that it will work on lambdas as well... but it would be nice for the JVM to provide TCO.  The combination of TCO and recur would be sweet.
-m</description>
		<content:encoded><![CDATA[<p>RE: `(recur)`</p>
<p>You make it look &#8216;more&#8217; like recursion by making the recur target the enclosing `defn` instead.  That is:</p>
<pre>
(defn member [x sq]
  (if (seq? sq)
    (if (= x (first sq))
      sq
      (recur x (rest sq)))))

(member 'a '(1 2 3 a b c))
</pre>
<p>The power of `recur` comes from the fact that it will work on lambdas as well&#8230; but it would be nice for the JVM to provide TCO.  The combination of TCO and recur would be sweet.<br />
-m</p>
]]></content:encoded>
	</item>
</channel>
</rss>
