Re: Transposing a map and back again

2014-08-01 Thread Andy Fingerhut
clojure.set/map-invert is the closest I can think of in the functions included with Clojure to your transpose function, but it does not handle duplicate values the way your transpose does. Andy On Fri, Aug 1, 2014 at 11:16 AM, Bruno Kim Medeiros Cesar < brunokim...@gmail.com> wrote: > Is there

Transposing a map and back again

2014-08-01 Thread Bruno Kim Medeiros Cesar
Is there a standard/library function to transpose a map from key-value to value-keys? I've met this task many times before, and I'm sure others have too. Here is the code I'm using, mildly highlighted by Google Groups. I used to copy-paste from Pygments.org