 
 (defn offset
   [xy-or-fn f]
-  (let [t (type xy-or-fn)]
   (cond
-    (vector? t) (let [[x y] xy-or-fn]
-                  (fn [[xi yi]]
-                    (f [(+ xi x) (+ yi y)])))
-    (fn? t)     (fn [[xi yi]]
-                 (let [[x y] (xy-or-fn [xi yi])]
-                   (f [(+ xi x) (+ yi y)]))))))
+    (vector? xy-or-fn)
+      (let [[x y] xy-or-fn]
+        (fn [[xi yi]]
+          (f [(+ xi x) (+ yi y)])))
+    (fn? xy-or-fn)
+      (fn [[xi yi]]
+        (let [[x y] (xy-or-fn [xi yi])]
+          (f [(+ xi x) (+ yi y)])))))
 
 (defn scale [s f]
   (fn [[x y]]


(defn -main [& args]
  (let [n (rn/create-noise)]
    #_(rn/print-fn (fn [x y] (rn/noise n x y)) 200 200)
    (rn/print-fn (coerce (radius)) 200 200)))


  (vec more))

(defn vsnoise
  [fnoise]
  (fn [[x y]]
    (vectorize (fnoise x y) (fnoise (+ x 12.301) (+ y 70.261)))))

(defn vnoise
  [noise]
