Another link to "why 
so": 
https://gist.github.com/reborg/dc8b0c96c397a56668905e2767fd697f#why-clojure-doesnt-have-a-generic-insert-lookup-append-that-works-the-same-on-all-collections
If you still, need this, take a 
look: 
https://github.com/cloojure/tupelo#adding-values-to-the-beginning-or-end-of-a-sequence

вторник, 17 июля 2018 г., 3:21:02 UTC+7 пользователь Christian Seberino 
написал:
>
> I'm impressed with Clojure syntax and I'm still a beginner.
>
> I noticed conj behaves differently for lists and vectors.  I also noticed 
> cons does not return a vector for a vector input.
>
> Is there any downside to make 2 macros...prepend and append that behave 
> the same for lists and vectors, and also,
> return same types as inputs?
>
> If I'm not mistaken, I believe it is for performance reasons that these 
> are not already in the standard language?
> For those that care about performance, it would be beholden on them to 
> pick the correct macro for their
> specific data structure.
>
> Good idea?
>
> Thanks!
>
> Chris
>
>
>

-- 
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
--- 
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to