There's no need to avoid `apply` altogether, IMO. You could do something like
this:
(let [raw (list :a 1 :b 2 :c 3)]
(into {:raw raw}
(filter (comp even? second)
(apply hash-map raw))))
BTW, `list` is pretty uncommon. Usually you'd just use a vector literal.
And this is the right place to ask!
> On May 12, 2016, at 00:46, hiskennyness <[email protected]> wrote:
>
> This does what I want but feels nooby-ish, as in "in a month I will do this
> without APPLY":
>
> (let [raw (list :a 1 :b 2 :c 3)]
> (apply assoc {}
> :raw raw
> (apply concat
> (filter #(even? (second %))
> (apply hash-map raw)))))
> ;; => {:raw (:a 1 :b 2 :c 3), :b 2}
>
> Am I being too hard on myself?
>
> Meta question: is there a better place to ask such questions?
>
> -kt
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.