<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	
	>
<channel>
	<title>
	Comments on: STL Function objects: Stateless is Stressless	</title>
	<atom:link href="https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Sun, 22 Oct 2017 12:19:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-598</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Sun, 22 Oct 2017 12:19:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=308#comment-598</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-596&quot;&gt;Jean Philippe François&lt;/a&gt;.

I mean to say print all numbers while they remain below 10. So the first time we meet 10 or more we stop printing. So I&#039;d say PrintUntilTenOrMore (or PrintWhileLessThanTen) could work, unless I&#039;ve missed something?

And for the lamda, we search the point where a number is 10 or more, so that&#039;s the end point of the first subrange. Again, I may have missed something, but this looks about right, don&#039;t you think?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-596">Jean Philippe François</a>.</p>
<p>I mean to say print all numbers while they remain below 10. So the first time we meet 10 or more we stop printing. So I&#8217;d say PrintUntilTenOrMore (or PrintWhileLessThanTen) could work, unless I&#8217;ve missed something?</p>
<p>And for the lamda, we search the point where a number is 10 or more, so that&#8217;s the end point of the first subrange. Again, I may have missed something, but this looks about right, don&#8217;t you think?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jean Philippe François		</title>
		<link>https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-596</link>

		<dc:creator><![CDATA[Jean Philippe François]]></dc:creator>
		<pubDate>Thu, 19 Oct 2017 13:06:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=308#comment-596</guid>

					<description><![CDATA[Hello, the name of the functor should not be PrintUntilTenOrLess instead of PrintUntilTenOrMore?

And this piece of code:


auto first10 = std::find_if(numbers.begin(), numbers.end(), [](int number){return number &#062;= 10;});

should it not be


auto first10 = std::find_if(numbers.begin(), numbers.end(), [](int number){return number &#060; 10;});]]></description>
			<content:encoded><![CDATA[<p>Hello, the name of the functor should not be PrintUntilTenOrLess instead of PrintUntilTenOrMore?</p>
<p>And this piece of code:</p>
<p>auto first10 = std::find_if(numbers.begin(), numbers.end(), [](int number){return number &gt;= 10;});</p>
<p>should it not be</p>
<p>auto first10 = std::find_if(numbers.begin(), numbers.end(), [](int number){return number &lt; 10;});</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-67</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Tue, 24 Jan 2017 18:48:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=308#comment-67</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-66&quot;&gt;Johel Ernesto Guerrero Peña&lt;/a&gt;.

Right! Fixed this by replacing with a take_while. Thanks Johel for pointing this out.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-66">Johel Ernesto Guerrero Peña</a>.</p>
<p>Right! Fixed this by replacing with a take_while. Thanks Johel for pointing this out.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Johel Ernesto Guerrero Peña		</title>
		<link>https://www.fluentcpp.com/2017/01/23/stl-function-objects-stateless-is-stressless/#comment-66</link>

		<dc:creator><![CDATA[Johel Ernesto Guerrero Peña]]></dc:creator>
		<pubDate>Tue, 24 Jan 2017 12:04:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=308#comment-66</guid>

					<description><![CDATA[As mentioned by skitleer in the reddit thread, the last code fragment prints all numbers less than 10, rather than until the first 10, like the previous ones. So the correct code would be:
&lt;pre&gt;&lt;code&gt;
for_each(delimit(numbers,10) &#124; transform(f),
         [](int number){std::cout &#060;&#060; number &#060;&#060; &#039;n&#039;;});
&lt;/code&gt;&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>As mentioned by skitleer in the reddit thread, the last code fragment prints all numbers less than 10, rather than until the first 10, like the previous ones. So the correct code would be:</p>
<pre><code>
for_each(delimit(numbers,10) | transform(f),
         [](int number){std::cout &lt;&lt; number &lt;&lt; &#039;n&#039;;});
</code></pre>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
