I'm not quite sure what you're asking. Clojure doesn't have byte literals, but 
you can use the function 'byte' to coerce an int literal:
(map class [2 3 4]) => (java.lang.Integer java.lang.Integer java.lang.Integer)
(map class (map byte [2 3 4])) => (java.lang.Byte java.lang.Byte java.lang.Byte)

Or you can create a Java byte[] array:
(def a (make-array Byte/TYPE 3))

But you still have to coerce:
(aset a 0 (byte 2)) => 2
(aset a 0 2) =>
java.lang.IllegalArgumentException: argument type mismatch (NO_SOURCE_FILE:0)


Have all good days,
David Sletten

On Sep 24, 2010, at 12:31 AM, HiHeelHottie wrote:

> 
> Is there a way to create a vector of byte literals eg. [64 69 72] as
> bytes?
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en





-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to