<?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 Protocols &amp; Datatypes &#8212; A sneak peek</title>
	<atom:link href="http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/feed/" rel="self" type="application/rss+xml" />
	<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/</link>
	<description>The Chronicles of Nerd-nia</description>
	<lastBuildDate>Thu, 24 Nov 2011 13:34:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Pankaj Doharey</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-492</link>
		<dc:creator>Pankaj Doharey</dc:creator>
		<pubDate>Thu, 24 Nov 2011 13:34:08 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-492</guid>
		<description>In ruby a statistical mode could be something as small as this :

p ARGV.collect {&#124;i&#124; [ARGV.count(i) , i]}.sort.last.last , 

which includes taking a input from command line ... can something similar be done in clojure. the above could could handle everything but floats. for floats we can use this.

p ARGV.uniq.map {&#124;i&#124; [ARGV.count(i) , (i.to_f == i.to_f.floor) ? i.to_i : i.to_f]}.sort.last.last

this new line can handle everything mixed strings floats , negatives and return a statistical mode.</description>
		<content:encoded><![CDATA[<p>In ruby a statistical mode could be something as small as this :</p>
<p>p ARGV.collect {|i| [ARGV.count(i) , i]}.sort.last.last , </p>
<p>which includes taking a input from command line &#8230; can something similar be done in clojure. the above could could handle everything but floats. for floats we can use this.</p>
<p>p ARGV.uniq.map {|i| [ARGV.count(i) , (i.to_f == i.to_f.floor) ? i.to_i : i.to_f]}.sort.last.last</p>
<p>this new line can handle everything mixed strings floats , negatives and return a statistical mode.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pankaj Doharey</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-491</link>
		<dc:creator>Pankaj Doharey</dc:creator>
		<pubDate>Thu, 24 Nov 2011 13:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-491</guid>
		<description>How to write a smallest statistical mode in clojure ? like for a series like :

# 1 2 3 4 5 2 4 8 9 0 1 5 3 6 6 7 0 -- normal series.
# 1 2.0 3 4.1 5 2.3 4 8 9 0 1 5 3.2 6 6 7 0 -1 -3 -5 -2 -1 -- mixed series with floats and negatives. What could be the shortest one liner for this ?</description>
		<content:encoded><![CDATA[<p>How to write a smallest statistical mode in clojure ? like for a series like :</p>
<p># 1 2 3 4 5 2 4 8 9 0 1 5 3 6 6 7 0 &#8212; normal series.<br />
# 1 2.0 3 4.1 5 2.3 4 8 9 0 1 5 3.2 6 6 7 0 -1 -3 -5 -2 -1 &#8212; mixed series with floats and negatives. What could be the shortest one liner for this ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-490</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 21 Oct 2011 19:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-490</guid>
		<description>Thanks for the nice explanation of protocols! I wasn&#039;t getting it before. I think I got it now. Keep the posts coming! :)</description>
		<content:encoded><![CDATA[<p>Thanks for the nice explanation of protocols! I wasn&#8217;t getting it before. I think I got it now. Keep the posts coming! <img src='http://freegeek.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidharth</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-487</link>
		<dc:creator>Sidharth</dc:creator>
		<pubDate>Wed, 28 Sep 2011 10:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-487</guid>
		<description>Best explanation of reify, defrecord and defprotocols!

It might be a good idea to show explictly that you can call (fly crow) if you simply used extend-type

Thanks!</description>
		<content:encoded><![CDATA[<p>Best explanation of reify, defrecord and defprotocols!</p>
<p>It might be a good idea to show explictly that you can call (fly crow) if you simply used extend-type</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Lawrence Aspden</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-432</link>
		<dc:creator>John Lawrence Aspden</dc:creator>
		<pubDate>Sat, 02 Oct 2010 08:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-432</guid>
		<description>Thanks! Just what I was looking for. Nicely written.</description>
		<content:encoded><![CDATA[<p>Thanks! Just what I was looking for. Nicely written.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikhil Prabhakar</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-427</link>
		<dc:creator>Nikhil Prabhakar</dc:creator>
		<pubDate>Sun, 22 Aug 2010 10:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-427</guid>
		<description>Excellent. Gentle Introduction.</description>
		<content:encoded><![CDATA[<p>Excellent. Gentle Introduction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-426</link>
		<dc:creator>robert</dc:creator>
		<pubDate>Tue, 17 Aug 2010 20:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-426</guid>
		<description>thanks for this post! helped a lot</description>
		<content:encoded><![CDATA[<p>thanks for this post! helped a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-424</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Mon, 02 Aug 2010 13:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-424</guid>
		<description>...treating defrecord instances like a normal map? Be careful and try (crow :nom) instead of (:nom crow) in Clojure 1.2.1-RC1.</description>
		<content:encoded><![CDATA[<p>&#8230;treating defrecord instances like a normal map? Be careful and try (crow :nom) instead of (:nom crow) in Clojure 1.2.1-RC1.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhijith</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-423</link>
		<dc:creator>Abhijith</dc:creator>
		<pubDate>Wed, 14 Jul 2010 10:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-423</guid>
		<description>Great article. Thanks!</description>
		<content:encoded><![CDATA[<p>Great article. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arun</title>
		<link>http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/comment-page-1/#comment-386</link>
		<dc:creator>Arun</dc:creator>
		<pubDate>Tue, 08 Jun 2010 12:27:41 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=91#comment-386</guid>
		<description>Hi, when is Clojure 1.2 due for release?  And what other new features will it have?</description>
		<content:encoded><![CDATA[<p>Hi, when is Clojure 1.2 due for release?  And what other new features will it have?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.780 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-12-07 15:40:49 -->

