Commits

Steve Losh  committed a1692c9

Tweak.

  • Participants
  • Parent commits 0c91112

Comments (0)

Files changed (1)

File src/khan/linear.clj

 (defn matrix* [m n]
   {:pre [(= (col-count m)
             (row-count n))]}
-  (let [nrows (row-count m)
-        ncols (col-count n)]
-    (apply vector
-           (map (fn [r]
-                  (apply vector
-                         (map (fn [c]
-                                (dot-product (nth (rows m) r)
-                                             (nth (cols n) c)))
-                              (range ncols))))
-                (range nrows)))))
+  (apply vector
+         (map (fn [r]
+                (apply vector
+                       (map (fn [c]
+                              (dot-product (nth (rows m) r)
+                                           (nth (cols n) c)))
+                            (range (col-count n)))))
+              (range (row-count m)))))