<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Geek Mama &#187; Add new tag</title>
	<atom:link href="http://blogs.law.harvard.edu/lianaleahy/tag/add-new-tag/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.law.harvard.edu/lianaleahy</link>
	<description>exploits of a mom on rails</description>
	<lastBuildDate>Wed, 25 Nov 2009 18:11:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
		<item>
		<title>each_with_index</title>
		<link>http://blogs.law.harvard.edu/lianaleahy/2008/10/15/each_with_index/</link>
		<comments>http://blogs.law.harvard.edu/lianaleahy/2008/10/15/each_with_index/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 19:04:12 +0000</pubDate>
		<dc:creator>lianaleahy</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/lianaleahy/?p=26</guid>
		<description><![CDATA[You won&#8217;t find each_with_index in the ruby Array class documentation.  But this handy little method allows you to iterate through an array while also keeping track of which element you&#8217;re on.
It works something like this:
 my_array.each_with_index do
&#124;a, index&#124; puts "#{a} is located at index #{index}"
end

Sure beats typing
 i=0; i++; i&#60;(array.size -1)
]]></description>
			<content:encoded><![CDATA[<p>You won&#8217;t find <strong>each_with_index</strong> in the <a href="http://www.ruby-doc.org/core/classes/Array.html#M002197">ruby Array class documentation</a>.  But this handy little method allows you to iterate through an array while also keeping track of which element you&#8217;re on.</p>
<p>It works something like this:<br />
<code> my_array.each_with_index do<br />
|a, index| puts "#{a} is located at index #{index}"<br />
end<br />
</code></p>
<p>Sure beats typing<br />
<code> i=0; i++; i&lt;(array.size -1)</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/lianaleahy/2008/10/15/each_with_index/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>
