<?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: Everybody loves the Sieve of Eratosthenes</title>
	<atom:link href="http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/feed/" rel="self" type="application/rss+xml" />
	<link>http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/</link>
	<description>When the pupil is ready to learn, a teacher will appear.</description>
	<lastBuildDate>Tue, 07 Sep 2010 05:36:26 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Project Euler Problem 7 &#171; Clojure Companion Cube</title>
		<link>http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/comment-page-1/#comment-531</link>
		<dc:creator>Project Euler Problem 7 &#171; Clojure Companion Cube</dc:creator>
		<pubDate>Fri, 04 Jun 2010 08:41:58 +0000</pubDate>
		<guid isPermaLink="false">http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/#comment-531</guid>
		<description>[...] favorite solution was by Cristophe Grande, not just because he followed a similar approach to me, but also because he was very clever in his [...]</description>
		<content:encoded><![CDATA[<p>[...] favorite solution was by Cristophe Grande, not just because he followed a similar approach to me, but also because he was very clever in his [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: You read my blog that&#8217;s enough social interaction!! / Sieve of eratosthenes</title>
		<link>http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/comment-page-1/#comment-94</link>
		<dc:creator>You read my blog that&#8217;s enough social interaction!! / Sieve of eratosthenes</dc:creator>
		<pubDate>Wed, 14 Oct 2009 15:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/#comment-94</guid>
		<description>[...] reading this post [...]</description>
		<content:encoded><![CDATA[<p>[...] reading this post [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zemariamm</title>
		<link>http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/comment-page-1/#comment-36</link>
		<dc:creator>zemariamm</dc:creator>
		<pubDate>Tue, 15 Sep 2009 02:36:14 +0000</pubDate>
		<guid isPermaLink="false">http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/#comment-36</guid>
		<description>Here&#039;s my naive, ugly and untested take on the problem:&lt;br /&gt;(defn not-divisible-by?[num denum]&lt;br /&gt;  (not (= (mod num denum) 0)))&lt;br /&gt;&lt;br /&gt;(defn primes&lt;br /&gt;  ([pos] (primes (vec (range 2 pos)) 0))&lt;br /&gt;  ([clist pos]&lt;br /&gt;  (cond&lt;br /&gt;    (&gt;= pos (count clist)) clist&lt;br /&gt;    :else&lt;br /&gt;    (let [val (nth clist pos)&lt;br /&gt;   starting (inc pos)]&lt;br /&gt;      (recur (into (subvec clist 0 starting) (vec (filter #(not-divisible-by? % val) (subvec clist starting (count clist))))) starting)))))</description>
		<content:encoded><![CDATA[<p>Here&#39;s my naive, ugly and untested take on the problem:<br />(defn not-divisible-by?[num denum]<br />  (not (= (mod num denum) 0)))</p>
<p>(defn primes<br />  ([pos] (primes (vec (range 2 pos)) 0))<br />  ([clist pos]<br />  (cond<br />    (&gt;= pos (count clist)) clist<br />    :else<br />    (let [val (nth clist pos)<br />   starting (inc pos)]<br />      (recur (into (subvec clist 0 starting) (vec (filter #(not-divisible-by? % val) (subvec clist starting (count clist))))) starting)))))</p>
]]></content:encoded>
	</item>
</channel>
</rss>
