      (loop [i 5 es es]
        (if (< i len)
          (do (aset res i (first es))
-             (recur (inc i) (rest es)))
+             (recur (inc i) (next es)))
          res)))))
 
 (defrecord EventCallbackInfo [event status data])

    (with-check err (aget res 0))))

(defn kernels
  ([program ^String name]
   (let [err (int-array 1)
         res (CL/clCreateKernel program name err)]
     (with-check-arr err res)))

            [clojure.core.async :refer [go >!]])
  (:import [org.jocl CL cl_platform_id cl_context_properties cl_device_id
            cl_context cl_command_queue cl_mem cl_program cl_kernel cl_sampler
            cl_event Sizeof Pointer CreateContextFunction EventCallbackFunction
            BuildProgramFunction]
           [java.nio ByteBuffer ByteOrder]))

(def ^:dynamic *platform*)
