On Monday, 30 January 2017 19:02:08 UTC+11, Sayth Renshaw wrote: > > > > On Monday, 30 January 2017 18:53:44 UTC+11, Alan Forrester wrote: >> >> >> > Hi >> > >> > If nil is true >> > >> > clojure-noob.core> (nil? nil) >> > true >> > >> > Then why doesn't nil return from this statement as the first true >> value? >> >> This expression is a function invocation. The function is the first item >> in the list and the argument is the second. So this expression asks if nil >> is nil, which is true. >> >> I cut the rest of your examples since they make similar mistakes. You >> don’t understand clojure very well, you may want to read the docs: >> >> https://clojure.org/reference/reader >> <https://www.google.com/url?q=https%3A%2F%2Fclojure.org%2Freference%2Freader&sa=D&sntz=1&usg=AFQjCNFZbto4LI2e6dV6ebx1OiG-iOCg-A> >> >> >> This isn’t an attack, just a statement of fact. >> >> Alan > > > lol Alan I was, reading clojure for the brave and new reading the or > syntax I didn't understand > > though I read https://clojuredocs.org/clojure.core/or > > reading your link now. > > Sayth >
My confusion is that nil is false and will return true if nil false on all other truthy values. It's a double negative same as clojure-noob.core> (false? false) true This is the better link https://clojuredocs.org/clojure.core/nil_q user=> (nil? nil)trueuser=> (nil? 0)falseuser=> (nil? false)falseuser=> (nil? '()) false -- 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.