                               {:scalar? true}))
 
 (def primitive-list [[[:bool] primitive-traits]
+                     [[:int32 :int] primitive-number-traits]
+                     [[:int64 :long] primitive-number-traits]
                      [[:float :float32] primitive-number-traits]
-                     [[:float64 :double] primitive-number-traits]
-                     [[:int32 :int] primitive-number-traits]
-                     [[:int64 :long] primitive-number-traits]])
+                     [[:float64 :double] primitive-number-traits]])
 
 (defn scalar? [x]
   (:scalar? x))

  ([x] (ad x {}))
  ([x derivative-map] (ad-sub x derivative-map)))

(defn ad? [x]
  (= (:type x) :ad))

(defn add-primitive-entry [dst [names properties]]
  (reduce
   (fn [dst name]
     (assoc 
      dst name 
      (assoc properties :priority 
             (count dst))))
   dst
   names))

