Re: Multiple key-value pairs in assoc-in (old issue)

2016-08-14 Thread Andy Fingerhut
Of course you can copy the newer definition of assoc-in into your own projects and use it if you like, but that probably doesn't prevent your little bit of sadness. Andy Sent from my iPhone > On Aug 14, 2016, at 5:27 AM, Łukasz Kożuchowski > wrote: > > I am a little sad now. Thanks for expl

'lein trampoline test' fails on first run with 'No implementation of method'

2016-08-14 Thread Brian Craft
With an empty target directory 'lein trampoline test' fails with a protocol exception, 'No implementation of method'. Running 'lein test' works fine. After running 'lein test', 'lein trampoline test' also works. Anyone know what's going on? Seems like something isn't being compiled, or loaded,

Re: grouping and mapping

2016-08-14 Thread Steve Miner
Sorry, I got the semantics of the grouping-fn wrong. My code assumes that the key is always first in the elements and my grouping is more like a merging-fn. > On Aug 14, 2016, at 2:53 PM, miner wrote: > > If your data elements are essentially map-entries (key-value pairs), I'd use > reduce.

Re: grouping and mapping

2016-08-14 Thread miner
If your data elements are essentially map-entries (key-value pairs), I'd use reduce. Maybe something like this would work for you... (defn mapping-group-by [grouping-fn mapping-fn coll] (reduce (fn [res [k v]] (update res k grouping-fn (mapping-fn v))) {} coll)) (def foos

grouping and mapping

2016-08-14 Thread Nathan Smutz
Just to put the basic Clojure out there: (->> (group-by first foos) (map (fn [[key col]] [key (mapv (comp clojure.string/upper-case second) col)])) (into {}) Kudos to Moe,Christopher and Simon. -- You received this message because you are subs

[ANN] Automatic Clojure Type Annotations

2016-08-14 Thread Ambrose Bonnaire-Sergeant
Hi, Happy to announce a new open-source Clojure tool to generate core.typed type annotations from tests. It's part of a new crowdfunding campaign I'm running, read on for details! # What is it? This tool infe

Re: Multiple key-value pairs in assoc-in (old issue)

2016-08-14 Thread Łukasz Kożuchowski
I am a little sad now. Thanks for explaining! Łukasz Kożuchowski On Aug 13, 2016 4:56 PM, "Andy Fingerhut" wrote: > That ticket is in a state called "Triaged", which means that a screener > (most likely Alex Miller) thinks the issue is good enough for Rich Hickey > to take a look at it some tim