Does Clojure have an analog of Lisp's MEMBER function?
(member 'a '(c a f e b a b e)) = (A F E B A B E)
(I'm more interested in it's use as a predicate rather than the fact
that it returns a sublist when true.)
find and contains? are listed under the Maps section of the data
structures page
Hi David,
Am 02.03.2009 um 13:54 schrieb David Sletten:
Does Clojure have an analog of Lisp's MEMBER function?
(member 'a '(c a f e b a b e)) = (A F E B A B E)
I don't know the member function of CL, but I interpret
your example, that it cuts away the head of the list until
the first
On Mar 2, 2009, at 3:39 AM, Meikel Brandmeyer wrote:
Does Clojure have an analog of Lisp's MEMBER function?
(member 'a '(c a f e b a b e)) = (A F E B A B E)
I don't know the member function of CL, but I interpret
your example, that it cuts away the head of the list until
the first
On Mon, Mar 2, 2009 at 6:54 AM, David Sletten da...@bosatsu.net wrote:
Does Clojure have an analog of Lisp's MEMBER function?
(member 'a '(c a f e b a b e)) = (A F E B A B E)
(I'm more interested in it's use as a predicate rather than the fact
that it returns a sublist when true.)
find
On Mar 2, 2009, at 4:01 AM, Mark Volkmann wrote:
It's verbose in order to discourage its use since its a linear search.
See the discussion about the contains? function at
http://www.ociweb.com/mark/clojure/article.html#Lists
and http://www.ociweb.com/mark/clojure/article.html#Sets.
Ahh.
There's also includes? in clojure.contrib.seq-utils.
-Jason
On Mar 2, 6:07 am, David Sletten da...@bosatsu.net wrote:
On Mar 2, 2009, at 4:01 AM, Mark Volkmann wrote:
It's verbose in order to discourage its use since its a linear search.
See the discussion about the contains? function