I did look at Specter and it looks nice and well engineered, but I never
really ran into the sorts of problem it solves, at least not enough to
warrant the cost of depending on a new library.

On Fri, 9 Sep 2016, at 12:49 PM, Mamun wrote:
> To me, Changing type or order is a lack of facility for basic task.
> In the end comping task is also become more hard.
> Have you tried to use Specter? Why do you not consider Specter lib?
>
>
> Br,
> Mamun
>
>
>
>
>
> On Friday, September 9, 2016 at 12:23:37 PM UTC+2, Colin Yates wrote:
>> Hi all,
>>
>> So in the spirit of exposing my ignorance to the internet :-), I have
>> just been bitten by a bug due to the behaviour of the core libraries
>> which I find really surprising:
>>
>> (def v [1 2 3])
>> (conj v 4) => [1 2 3 4]
>> (conj (map identity v) 4) => (4 1 2 3)
>> (conj (remove (constantly false) v) 4) => (4 1 2 3)
>> (conj (filter identity v) 4) => (4 1 2 3)
>>
>> In other words, I was relying on map, remove and filter preserving
>> the semantics (other than laziness) of the structure of the input,
>> give it a vector and you get a vector-like lazy sequence. This turns
>> out not to be the case.
>>
>> Now, I know there is mapv which returns a vector but why isn't there
>> a removev and a filterv etc.?
>>
>> What makes it more onerous for me is the fact conj states that its
>> behaviour differs depending on the concrete type, which is great, but
>> how am I supposed to know which concrete type is returned from
>> map|filter|remove? My assumption was it would be semantically
>> equivalent to the input (i.e. a vector in this case).
>>
>> The reason I have dodged this is because I don't frequently rely on
>> vector semantics but I am surprised this isn't better documented?
>>
>> Is it me?
>>
>> Thanks,
>>
>> Colin
>
> --
>  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.

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