<?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: Functional Programming with JavaScript and Dojo</title>
	<atom:link href="http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: peteotaqui</title>
		<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/comment-page-1#comment-265141</link>
		<dc:creator>peteotaqui</dc:creator>
		<pubDate>Tue, 17 Jun 2008 08:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3291#comment-265141</guid>
		<description>@Les as @elazutkin said, using return is a good bet.

Within a function used by forEach() you can &#039;return&#039; to simulate a continue:
&lt;code&gt;
var aList = new Array(1,2,3,4);
dojo.forEach(aList,function(nArg) {
 if ( nArg == 2 ) return;
 console.log(nArg);
});
// outputs 1,3,4
&lt;/code&gt;

You could add some more code to simulate break, but by the time you do that one has to wonder whether it&#039;s worth using the forEach construct in the first place.</description>
		<content:encoded><![CDATA[<p>@Les as @elazutkin said, using return is a good bet.</p>
<p>Within a function used by forEach() you can &#8216;return&#8217; to simulate a continue:<br />
<code><br />
var aList = new Array(1,2,3,4);<br />
dojo.forEach(aList,function(nArg) {<br />
 if ( nArg == 2 ) return;<br />
 console.log(nArg);<br />
});<br />
// outputs 1,3,4<br />
</code></p>
<p>You could add some more code to simulate break, but by the time you do that one has to wonder whether it&#8217;s worth using the forEach construct in the first place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: elazutkin</title>
		<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/comment-page-1#comment-261124</link>
		<dc:creator>elazutkin</dc:creator>
		<pubDate>Tue, 05 Feb 2008 03:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3291#comment-261124</guid>
		<description>@Les: personally I use every() or some() to simulate the breaking out of loop:

&lt;code&gt;
dojo.some(array, function(val){
    // do something useful
    return criterium(val); // break if true
});
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@Les: personally I use every() or some() to simulate the breaking out of loop:</p>
<p><code><br />
dojo.some(array, function(val){<br />
    // do something useful<br />
    return criterium(val); // break if true<br />
});<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peller</title>
		<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/comment-page-1#comment-261123</link>
		<dc:creator>peller</dc:creator>
		<pubDate>Tue, 05 Feb 2008 03:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3291#comment-261123</guid>
		<description>@Les: I think the goal is to be functionally compatible with the spec&#039;d Mozilla extensions for direct replacement with the native methods, where available.  In that spirit, I think the solution is to use Array.every (aka dojo.every) if you wish to break out of the loop.</description>
		<content:encoded><![CDATA[<p>@Les: I think the goal is to be functionally compatible with the spec&#8217;d Mozilla extensions for direct replacement with the native methods, where available.  In that spirit, I think the solution is to use Array.every (aka dojo.every) if you wish to break out of the loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/comment-page-1#comment-261121</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Mon, 04 Feb 2008 21:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3291#comment-261121</guid>
		<description>Thank you Eugene! It is really what JS community needs! 

To the rest of dojo team: Guys, the documentation is your advertising. Newcomers will not consider that you were almost THE_FIRST framework outhere. Rare teamlead/architect will approve using of framework with absent tutorials and API doc. Wake up! Old good days passed. Now you have to compete. No offenses, but compare your doco with http://extjs.com/deploy/dev/docs/.</description>
		<content:encoded><![CDATA[<p>Thank you Eugene! It is really what JS community needs! </p>
<p>To the rest of dojo team: Guys, the documentation is your advertising. Newcomers will not consider that you were almost THE_FIRST framework outhere. Rare teamlead/architect will approve using of framework with absent tutorials and API doc. Wake up! Old good days passed. Now you have to compete. No offenses, but compare your doco with <a href="http://extjs.com/deploy/dev/docs/" rel="nofollow">http://extjs.com/deploy/dev/docs/</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gavindoughtie</title>
		<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/comment-page-1#comment-261118</link>
		<dc:creator>gavindoughtie</dc:creator>
		<pubDate>Mon, 04 Feb 2008 18:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3291#comment-261118</guid>
		<description>I did submit a reduce implementation to dojo a while back:

http://trac.dojotoolkit.org/changeset/5185

But don&#039;t know if it survived the Great Reorg for 0.9</description>
		<content:encoded><![CDATA[<p>I did submit a reduce implementation to dojo a while back:</p>
<p><a href="http://trac.dojotoolkit.org/changeset/5185" rel="nofollow">http://trac.dojotoolkit.org/changeset/5185</a></p>
<p>But don&#8217;t know if it survived the Great Reorg for 0.9</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Trenka</title>
		<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/comment-page-1#comment-261112</link>
		<dc:creator>Tom Trenka</dc:creator>
		<pubDate>Mon, 04 Feb 2008 14:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3291#comment-261112</guid>
		<description>Hi Les--feel free to file an enhancement ticket at trac.dojotoolkit.org (login as guest/guest) if you&#039;d like to see us add that feature.  My understanding is that dojo.forEach was modeled on the Array Extras, and off the top of my head I don&#039;t believe there&#039;s a way to break from that function either (though I could definitely be wrong).</description>
		<content:encoded><![CDATA[<p>Hi Les&#8211;feel free to file an enhancement ticket at trac.dojotoolkit.org (login as guest/guest) if you&#8217;d like to see us add that feature.  My understanding is that dojo.forEach was modeled on the Array Extras, and off the top of my head I don&#8217;t believe there&#8217;s a way to break from that function either (though I could definitely be wrong).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Les</title>
		<link>http://ajaxian.com/archives/functional-programming-with-javascript-and-dojo/comment-page-1#comment-261111</link>
		<dc:creator>Les</dc:creator>
		<pubDate>Mon, 04 Feb 2008 14:39:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3291#comment-261111</guid>
		<description>This is good, but I don&#039;t see a way to break from dojo.forEach, which is available in Prototype.</description>
		<content:encoded><![CDATA[<p>This is good, but I don&#8217;t see a way to break from dojo.forEach, which is available in Prototype.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

