>    - Is there a way to make this function less complicated? without
>    recursion maybe?

Looks like you're covered on this one.

>    - Is there something simpler than (concat even-more (list (hash-map k
>    v)) to append an element at the end of a sequence?

Clojure is opinionated in this sense.  Appending to the end of a
general sequence is O(n), so it's intentionally clunky to do so.  If
you had to do it, you'd use (concat even-more [(hash-map k v)]) --
explicit calls to list are  rare in idiomatic code -- but the
preferred way is generally to use a vector, with conj or into, which
has O(log n) performance:

user> (conj [1 2 3] 4)
[1 2 3 4]
user> (into [1 2 3] [5 6])
[1 2 3 5 6]

-Jason

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