<?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"
	>
<channel>
	<title>Comments on: SICP section 4.2.2</title>
	<atom:link href="http://eli.thegreenplace.net/2007/12/25/sicp-section-422/feed/" rel="self" type="application/rss+xml" />
	<link>http://eli.thegreenplace.net/2007/12/25/sicp-section-422/</link>
	<description>Eli Bendersky's personal website</description>
	<pubDate>Fri, 21 Nov 2008 22:37:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2007/12/25/sicp-section-422/#comment-106614</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Tue, 05 Feb 2008 16:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/12/25/sicp-section-422/#comment-106614</guid>
		<description>Flávio, but what practical use would this have ? 

I suppose it's possible to envision being passed such a true/false list to choose from two lists, but I would find the "map on if" approach obscure, and would definitely encapsulate it into something more legible.

CL and Scheme can't do this anyway, so I don't think it's too important a need :-)</description>
		<content:encoded><![CDATA[<p>Flávio, but what practical use would this have ? </p>
<p>I suppose it&#8217;s possible to envision being passed such a true/false list to choose from two lists, but I would find the &#8220;map on if&#8221; approach obscure, and would definitely encapsulate it into something more legible.</p>
<p>CL and Scheme can&#8217;t do this anyway, so I don&#8217;t think it&#8217;s too important a need <img src='http://eli.thegreenplace.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flávio Cruz</title>
		<link>http://eli.thegreenplace.net/2007/12/25/sicp-section-422/#comment-106492</link>
		<dc:creator>Flávio Cruz</dc:creator>
		<pubDate>Tue, 05 Feb 2008 10:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/12/25/sicp-section-422/#comment-106492</guid>
		<description>One possible use of "if" or "unless" as high order procedures would be something like this:

(map if '(true false true) '(2 3 4) '(3 6 2)) -&#62; '(2 6 4)

map would build a list selecting an element of the second or third list depending on the values of the first list.</description>
		<content:encoded><![CDATA[<p>One possible use of &#8220;if&#8221; or &#8220;unless&#8221; as high order procedures would be something like this:</p>
<p>(map if &#8216;(true false true) &#8216;(2 3 4) &#8216;(3 6 2)) -&gt; &#8216;(2 6 4)</p>
<p>map would build a list selecting an element of the second or third list depending on the values of the first list.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
