              (if (nil? a)
               result
               (recur rest-pixels (conj result (greyscale r g b a)))))]
-    (f pixels [])))
+    (array-to-arrays (f pixels []) (.-width canvas) [])))
 
 
 (defn on-image-load [event]

                   (swap! result conj val)))
    @result))

(defn black-and-white [context canvas]
  (let [pixels (get-pixels context canvas)
        greyscale (fn[r g b alpha]

    (set! (.-height canvas) (.-height image))
    (.drawImage context image 0 0)
    (let [pixels (black-and-white context canvas)]
      (print pixels)
      (print (alength pixels)))
    )
  )

