            (fold pf1 1.0 x y y) => 39.0
            (fold pf1o [] x y y) => [5.0 8.0 11.0 14.0]
 
+           (fold pf1 1.0 x y y y) => 53.0
+           (fold pf1o [] x y y y) => [7.0 11.0 15.0 19.0]
+
            (fold + 1.0 x y y y) => (throws IllegalArgumentException))))
 
 (defn test-seq-vector [factory]

  (let [fx (fn [] (create-ge-matrix factory 2 3 [1 2 3 4 5 6]))
        fy (fn [] (create-ge-matrix factory 2 3 [2 3 4 5 6 7]))
        x (fx)
        pf1 (fn ^double [^double x] (double (+ x 1.0)))
        pf2 (fn ^double [^double x ^double y] (double (+ x y)))
        pf3 (fn ^double [^double x ^double y ^double z] (double (+ x y z)))
        pf4 (fn ^double [^double x ^double y ^double z ^double v]
              (double (+ x y z v)))]
    (facts "Functor implementation for real general matrix"
           (instance? clojure.lang.IFn$DD pf1) => true

           (fmap! pf1 (fx)) => (fy)
           (fmap! pf1 x) => x

           (fmap! pf2 (fx) (fy))
           => (create-ge-matrix factory 2 3 [3 5 7 9 11 13])
           (fmap! pf2 x (fy)) => x

           (fmap! pf3 (fx) (fy) (fy))
           => (create-ge-matrix factory 2 3 [5 8 11 14 17 20])
           (fmap! pf3 x (fy) (fy)) => x

           (fmap! pf4 (fx) (fy) (fy) (fy))
           => (create-ge-matrix factory 2 3 [7 11 15 19 23 27])
           (fmap! pf4 x (fy) (fy) (fy)) => x

           (fmap! + (fx) (fy) (fy) (fy) [(fy)])
           => (throws UnsupportedOperationException))))

           (release sub-a) => true
           (release a) => true
           (release a) => true)))

(defn test-ifn-vector [factory]
  (facts "IFn implementation for real block vector"
         (let [x (create-vector factory [1 2 3 4])]
