     :result/adjudicator {:adjudicator/number 1},
     :result/participant {:participant/number 144}}])
 
-(defn get-dancers [result-facts]
-  (vec (sort  (apply hash-set (map #(get-in % [:result/participant :participant/number]) result-facts)))))
-
 (defn get-mark [result-facts dancer-number adjudicator-number]
   (let [marks (filterv #(= dancer-number (get-in % [:result/participant :participant/number]))
                        (filter #(= adjudicator-number (get-in % [:result/adjudicator :adjudicator/number])) result-facts))]

            :dances (vec (map #(hash-map :name (:dance/name %))
                                (get-in activity-result [:round/dances])))
            :result-array (result-facts->result-array (:result/_activity activity-result)
                                                      (get-in activity-result
                                                              [:round/panel
                                                               :adjudicator-panel/adjudicators]))}})

(def adjudicators
  [{:adjudicator/number 1}

(defn get-marks-for-dancer [result-facts adjudicator-numbers dancer-number]
  (mapv (partial get-mark result-facts dancer-number) adjudicator-numbers))

(defn result-facts->result-array [result-facts dancers adjudicators]
  (let [adjudicator-numbers (map :adjudicator/number adjudicators)
        dancer-numbers (map :participant/number dancers)]
    (mapv #(hash-map :dancer-number %
                     :marks (get-marks-for-dancer result-facts adjudicator-numbers %))
          dancer-numbers)))
