Hello,
IM working at the Iloveponies github tutorial and Im stuck here,
I have to check if x is a nil or false and then the output must be false,\
Otherwise I have to be true.
So I tried this :
(defn boolean [x]
(if (and (nil? x) (false? x))
)
But then I see a very long error message:
Hello,
You miss one parentheses at the end of your expression
(defn boolean [x]
(if (and (nil? x) (false? x))
))
cheers,
stan.
On Thursday, April 17, 2014 9:11:13 AM UTC+2, Roelof Wobben wrote:
Hello,
IM working at the Iloveponies github tutorial and Im stuck here,
I have to check
Hi Roelof,
I'd recommend using an editor that supports rainbow brackets so you can
easily see when your parens are matched.
Also, when you get your parens matched you'll find another error in your
code, check out the docs for if
http://clojuredocs.org/clojure_core/clojure.core/ifto figure
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.,
Op donderdag 17 april 2014 09:34:52 UTC+2 schreef Tassilo Horn:
Stanislas Nanchen stanisla...@gmail.com javascript: 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
Roelof Wobben rwob...@hotmail.com writes:
Hi Roelof,
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
On Apr 17, 2014, at 02:34 , Tassilo Horn t...@gnu.org wrote:
And now you have an if without then which will give you another
exception.
Not true. It's more common to use 'when', but single-branch ifs are perfectly
fine.
--
You received this message because you are subscribed to the Google
Op donderdag 17 april 2014 13:26:35 UTC+2 schreef Michael Gardner:
On Apr 17, 2014, at 02:34 , Tassilo Horn ts...@gnu.org javascript:
wrote:
And now you have an if without then which will give you another
exception.
Yep, but that one I solved already.
Not true. It's more
Michael Gardner gardne...@gmail.com writes:
And now you have an if without then which will give you another
exception.
Not true. It's more common to use 'when', but single-branch ifs are
perfectly fine.
Yes, but that was a zero-branch if, and that's not ok.
Bye,
Tassilo
--
You received
On Apr 17, 2014, at 07:38 , Tassilo Horn t...@gnu.org wrote:
Michael Gardner gardne...@gmail.com writes:
And now you have an if without then which will give you another
exception.
Not true. It's more common to use 'when', but single-branch ifs are
perfectly fine.
Yes, but that was a
10 matches
Mail list logo