SHARE
TWEET

clj-loop-recur-type-error

ajmccluskey Oct 4th, 2014 (edited) 184 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; CompilerException java.lang.IllegalArgumentException:  recur arg for primitive local: last_byte is not
  2. ; matching primitive, had: Object, needed: byte, compiling:...
  3.  
  4. (defn test-lr []
  5.   (loop [last-byte (byte 0)
  6.          bytez (map byte '(1 2 3 4))
  7.          answer '()]
  8.     (if (empty? bytez)
  9.       answer
  10.       (recur (first bytez)
  11.              (rest bytez)
  12.              (cons (bit-or (first bytez last-byte) answer))))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top