<?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: String concatenation</title>
	<atom:link href="http://erlangexamples.com/2009/02/25/string-concatenation/feed/" rel="self" type="application/rss+xml" />
	<link>http://erlangexamples.com/2009/02/25/string-concatenation/</link>
	<description>Diving into Erlang World</description>
	<lastBuildDate>Thu, 22 Mar 2012 01:36:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: trung</title>
		<link>http://erlangexamples.com/2009/02/25/string-concatenation/comment-page-1/#comment-274</link>
		<dc:creator>trung</dc:creator>
		<pubDate>Thu, 16 Jul 2009 14:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://erlangexamples.com/?p=35#comment-274</guid>
		<description>Thanks Denny for the comment. 
Hmm, I though initially that ++ is quite native, why they used it in lists:concat/1 implementation then?</description>
		<content:encoded><![CDATA[<p>Thanks Denny for the comment.<br />
Hmm, I though initially that ++ is quite native, why they used it in lists:concat/1 implementation then?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denny Abraham</title>
		<link>http://erlangexamples.com/2009/02/25/string-concatenation/comment-page-1/#comment-273</link>
		<dc:creator>Denny Abraham</dc:creator>
		<pubDate>Thu, 16 Jul 2009 02:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://erlangexamples.com/?p=35#comment-273</guid>
		<description>Hi Trung,

According to Programming Erlang, the source for the lists module is only an illustrative implementation. Use of ++ is discouraged for all but trivially small lists.

-Denny</description>
		<content:encoded><![CDATA[<p>Hi Trung,</p>
<p>According to Programming Erlang, the source for the lists module is only an illustrative implementation. Use of ++ is discouraged for all but trivially small lists.</p>
<p>-Denny</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trung</title>
		<link>http://erlangexamples.com/2009/02/25/string-concatenation/comment-page-1/#comment-250</link>
		<dc:creator>trung</dc:creator>
		<pubDate>Sun, 10 May 2009 15:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://erlangexamples.com/?p=35#comment-250</guid>
		<description>Thanks, Fabian.
I&#039;ve looked at the source code for lists.erl, your&#039;re right, lists:concat/1 uses ++ for concatenation:

concat(List) -&gt;
    flatmap(fun thing_to_list/1, List).

thing_to_list(X) when is_integer(X) -&gt; integer_to_list(X);
thing_to_list(X) when is_float(X)   -&gt; float_to_list(X);
thing_to_list(X) when is_atom(X)    -&gt; atom_to_list(X);
thing_to_list(X) when is_list(X)    -&gt; X.       %Assumed to be a string

flatmap(F, [Hd&#124;Tail]) -&gt;
    F(Hd) ++ flatmap(F, Tail);</description>
		<content:encoded><![CDATA[<p>Thanks, Fabian.<br />
I&#8217;ve looked at the source code for lists.erl, your&#8217;re right, lists:concat/1 uses ++ for concatenation:</p>
<p>concat(List) -><br />
    flatmap(fun thing_to_list/1, List).</p>
<p>thing_to_list(X) when is_integer(X) -> integer_to_list(X);<br />
thing_to_list(X) when is_float(X)   -> float_to_list(X);<br />
thing_to_list(X) when is_atom(X)    -> atom_to_list(X);<br />
thing_to_list(X) when is_list(X)    -> X.       %Assumed to be a string</p>
<p>flatmap(F, [Hd|Tail]) -><br />
    F(Hd) ++ flatmap(F, Tail);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabian Alenius</title>
		<link>http://erlangexamples.com/2009/02/25/string-concatenation/comment-page-1/#comment-193</link>
		<dc:creator>Fabian Alenius</dc:creator>
		<pubDate>Fri, 08 May 2009 15:09:02 +0000</pubDate>
		<guid isPermaLink="false">http://erlangexamples.com/?p=35#comment-193</guid>
		<description>Ops, I&#039;m blind. Seems you already have an example of ++.</description>
		<content:encoded><![CDATA[<p>Ops, I&#8217;m blind. Seems you already have an example of ++.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabian Alenius</title>
		<link>http://erlangexamples.com/2009/02/25/string-concatenation/comment-page-1/#comment-192</link>
		<dc:creator>Fabian Alenius</dc:creator>
		<pubDate>Fri, 08 May 2009 15:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://erlangexamples.com/?p=35#comment-192</guid>
		<description>You could also do X ++ Y, I&#039;m not sure if it&#039;s just syntactic sugar for lists:concat(...) or not but I suspect it might be.</description>
		<content:encoded><![CDATA[<p>You could also do X ++ Y, I&#8217;m not sure if it&#8217;s just syntactic sugar for lists:concat(&#8230;) or not but I suspect it might be.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

