<?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: Clojure: Checking for a nil value in a collection</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/11/21/clojure-checking-for-a-nil-value-in-a-collection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/11/21/clojure-checking-for-a-nil-value-in-a-collection/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: michael d. hall</title>
		<link>http://www.markhneedham.com/blog/2009/11/21/clojure-checking-for-a-nil-value-in-a-collection/comment-page-1/#comment-123314</link>
		<dc:creator>michael d. hall</dc:creator>
		<pubDate>Tue, 17 May 2011 17:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1856#comment-123314</guid>
		<description> We&#039;re not even on the same project anymore and you still helped me! :)</description>
		<content:encoded><![CDATA[<p> We&#8217;re not even on the same project anymore and you still helped me! <img src='http://www.markhneedham.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Hume</title>
		<link>http://www.markhneedham.com/blog/2009/11/21/clojure-checking-for-a-nil-value-in-a-collection/comment-page-1/#comment-27083</link>
		<dc:creator>John Hume</dc:creator>
		<pubDate>Sun, 22 Nov 2009 17:26:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1856#comment-27083</guid>
		<description>Oops ... clearly I haven&#039;t been writing enough Clojure recently. I stick by my assertion that `some` isn&#039;t a predicate, but it returns the first logically true result of applying the first argument (not the value that yielded the logical true, as I previously stated). Given this, it will always just return true or nil if you give it a true predicate function as the first argument.

There are these though:

(some #{:foo :bar} [:baz :bar]) =&gt; :bar

(some {:a &quot;Aye&quot; :b &quot;Bee&quot;} [:c :b]) =&gt; &quot;Bee&quot;</description>
		<content:encoded><![CDATA[<p>Oops &#8230; clearly I haven&#8217;t been writing enough Clojure recently. I stick by my assertion that `some` isn&#8217;t a predicate, but it returns the first logically true result of applying the first argument (not the value that yielded the logical true, as I previously stated). Given this, it will always just return true or nil if you give it a true predicate function as the first argument.</p>
<p>There are these though:</p>
<p>(some #{:foo :bar} [:baz :bar]) =&gt; :bar</p>
<p>(some {:a &#8220;Aye&#8221; :b &#8220;Bee&#8221;} [:c :b]) =&gt; &#8220;Bee&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Hume</title>
		<link>http://www.markhneedham.com/blog/2009/11/21/clojure-checking-for-a-nil-value-in-a-collection/comment-page-1/#comment-27082</link>
		<dc:creator>John Hume</dc:creator>
		<pubDate>Sun, 22 Nov 2009 17:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1856#comment-27082</guid>
		<description>I don&#039;t think Clojure prefers nil over false. Note that it&#039;s `some`, not `some?`: it isn&#039;t a predicate for seeing whether something in the collection satisfies another predicate, rather it&#039;s a function for getting some element that satisfies a given predicate. (There is, however, no predicate for doing this job, while there are `every?`, `not-every?`, and `not-any?`, so it ends up used in place of a predicate often, thanks to nil being falsey.)</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think Clojure prefers nil over false. Note that it&#8217;s `some`, not `some?`: it isn&#8217;t a predicate for seeing whether something in the collection satisfies another predicate, rather it&#8217;s a function for getting some element that satisfies a given predicate. (There is, however, no predicate for doing this job, while there are `every?`, `not-every?`, and `not-any?`, so it ends up used in place of a predicate often, thanks to nil being falsey.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

