Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 552e2b5

Browse files
author
Ryan Neufeld
committed
Merge pull request clojure-cookbook#442 from dz-cies/master
Update 2-26_determining-if-a-collection-holds-one-of-several-values.asciidoc
2 parents 8136c93 + f469b0c commit 552e2b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

02_composite-data/2-26_determining-if-a-collection-holds-one-of-several-values.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ you're using to test a collection with. Consider the following:
4242
----
4343

4444
Because the +some+ function returns the _value_ returned from the
45-
predicate function, not just +true+ or +false+, using it with sets
45+
predicate function when it's logically true, or +nil+ otherwise, not just +true+ or +false+, using it with sets
4646
that contain +nil+ or +false+ probably isn't what you want--it will
47-
return +nil+ or +false+ if the item actually _is_ in the set. The simplest solution is to test for +nil+ or +false+ separately,
47+
return +nil+ if the item actually _is_ in the set. The simplest solution is to test for +nil+ or +false+ separately,
4848
using the +nil?+ or +false?+ predicate functions built into Clojure:
4949

5050
[source,clojure]

0 commit comments

Comments
 (0)