Well, I think you've exposed an inconsistency in the signature of
clojure.set/select vis-a-vis the "collection first, sequence last"
principles here:
http://groups.google.com/group/clojure/msg/a8866d34b601ff43
It seems that the collection function clojure.set/select is patterned
after
the sequenc
On Feb 4, 3:31 am, wlr wrote:
> (-> #{{:a 1, :b 1, :c 1}
>{:a 2, :b 2, :c 2}
>{:a 3, :b 3, :c 3}}
>(->> (select #(= (:a %) 1)))
>(project [:b :c]))
>
> => #{{:c 1, :b 1}}
Ahhh.. what a tricky language. ;) This saves me from writing reverse-
args or select*,
On Feb 3, 6:41 pm, Tayssir John Gabbour
wrote:
> ;; Works, but is ugly.
> (let [xset #{{:a 1, :b 1, :c 1}
> {:a 2, :b 2, :c 2}
> {:a 3, :b 3, :c 3}}]
> (project (select #(= (:a %) 1) xset)
> [:b :c]))
>
> So what I currently do is this:
>
> ;; Works, with
On Feb 3, 10:41 pm, wlr wrote:
> Can you somehow use ->> ?
>
> user> (->> #{1 2 3 4} (clojure.set/select even?))
> #{2 4}
D'oh, I was terribly unclear. I want to do something neat and pretty
like:
;; Doesn't work!
(-> #{{:a 1, :b 1, :c 1}
{:a 2, :b 2, :c 2}
{:a 3, :b 3, :c 3}}
(s
Can you somehow use ->> ?
user> (->> #{1 2 3 4} (clojure.set/select even?))
#{2 4}
Walt
--
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 -