Should have been:    (evens? nil)

On Thu, Sep 20, 2018 at 1:47 PM Alan Thompson <clooj...@gmail.com> wrote:

> `println` always returns `nil`.  So it prints "one", returns `nil`, and
> you try to execute the form:
>
> (nil)  => NullPointerException
>
>
> user=> (evens? (println “one”))
> one
> NullPointerException   user/eval239 (NO_SOURCE_FILE:74)
>
>
> On Thu, Sep 20, 2018 at 9:06 AM Orestis Markou <ores...@orestis.gr> wrote:
>
>> evens? is not a macro, therefore when you do (evens? (println “one”)),
>> the println will be evaluated first, and its return value, nil, gets passed
>> into the evens function.
>>
>>
>>

-- 
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