Stanislas Nanchen <stanislas.nanc...@gmail.com> writes:

> You miss one parentheses at the end of your expression
>
> (defn boolean [x]
>   (if (and (nil? x) (false? x))
>   ))

And now you have an if without then which will give you another
exception.  And the test expression is a contradiction, i.e., it's
always false.  Nothing can be both nil? and false?.

> I have to check if x is a nil or false and then the output must be
> false,\ Otherwise I have to be true.

Why?  nil and false are already falsy, everything else is true.  And if
you have to interact with java where some method wants some "real"
boolean, then there's already clojure.core/boolean.

Bye,
Tassilo

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to