> That is what I thought. Is it proper or idiomatic Clojure to use a "?"
> symbol on non-predicate functions?

I don't think so. The standard library doesn't, at any rate.

Note that predicates don't necessarily have to return literal true or  
false: in my opinion at least, it's perfectly reasonable to write

(def my-predicate? #{:foo :bar})

-- it'll behave correctly in if and when, but the return value will  
actually be a keyword or nil, not true or false.

> That is somewhat what prompted my question. If a "?" symbol is
> generally, always or primarily reserved for predicates, it just seemed
> strange to use a non-predicate example in the book. Especially when  
> the
> example could just as easily used  true or false, instead of  yes   
> or   no.

Certainly seems odd to me.

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

Reply via email to