title: Opportunity to use a transducer?
body: <p>Using Clojure, I'm pulling some data out of a SQLite DB. It will arrive in the form of a list of maps. Here is an abbreviated sample of what the data  looks like.</p>
  
  <pre><code>(
       {:department-id 1 :employee-firstname "Fred" :employee-lastname "Bloggs"}
       {:department-id 1 :employee-firstname "Joe" :employee-lastname "Bloggs"}
       {:department-id 2 :employee-firstname "John" :employee-lastname "Doe"}
        ...
  )
  </code></pre>
  
  <p>I would like to reshape it into something like this:</p>
  
  <pre><code>(
   {:department-id 1 :employees [{:employee-firstname "Joe" :employee-lastname "Bloggs"} {:employee-firstname "Fred" :employee-lastname "Bloggs"}]}
   {:department-id 2 :employees [{:employee-firstname "John" :employee-lastname "Doe"}]
   ... 
  )
  </code></pre>
  
  <p>I know I could a write a function that dealt with the departments and then the employees and "glued" them back together to achieve the shape I want. In fact I did just that in the REPL.</p>
  
  <p>But I've heard a bit about transducers recently and wondered was this an opportunity to use one. </p>
  
  <p>If it is, what would the code look like? </p>