Because bit-xor returns a integer,so you have to cast it to byte:
(amap ^bytes an-array
idx
ret
(byte (bit-xor (byte 0)
(aget ^bytes an-array idx))))
2012/2/17 Andreas Kostler <[email protected]>
> Hi all,
> I'm experiencing the following problem:
>
> (def an-array (byte-array 200 (byte 1)))
> (amap ^bytes an-array
> idx
> ret
> (bit-xor (byte 0)
> (aget ^bytes an-array idx)))
>
> Resulting in:
>
> No matching method found: aset
>
> Wheras this:
>
> (def another-array (int-array 200 (int 1)))
> (amap ^ints an-array
> idx
> ret
> (bit-xor (int 0)
> (aget ^ints another-array idx)))
>
> Works as expected. Does anyone know what's going on?
> Clojure version is 1.3.0
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
庄晓丹
Email: [email protected] [email protected]
Site: http://fnil.net
Twitter: @killme2008
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en