Hi,

On Mar 9, 6:26 am, Srini <devfac...@gmail.com> wrote:

> ; count does not work. I get an exception. Need to figure out what I
> am doing wrong here.
> user=> (count (list 23 "3er" oel" 5) )
                               ^^^^^^ unbalanced string

> ; could not get it to work for lists. apparently works only for
> numerically indexed collections like vectors.
> ; doesn't throw an exception either. "intuitively", I think the
> following should have returned true.
> user=> (contains? (list "3e" "2 tired" "1 more") "3e" )
> false

Re-read the docstring of contains?: Does not do linear lookup. Use
(some #{"3e"} (list ...)). Or (first (filter #(= % "3e") (list ...)))
if false or nil are valid values in your list.

Sincerely
Meikel

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