Re: Byte Literals

2010-09-24 Thread David Sletten
Ah, right. Thanks. I'm not keeping up with my Clojure version numbers... On Sep 24, 2010, at 1:52 AM, Rasmus Svensson wrote: There's also 'bytes', 'byte-array' and 'into-array': (byte-array (map byte [1 2 3])) (into-array Byte/TYPE (map byte [1 2 3])) // raek -- You received this

Byte Literals

2010-09-23 Thread HiHeelHottie
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

Re: Byte Literals

2010-09-23 Thread David Sletten
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

Re: Byte Literals

2010-09-23 Thread Rasmus Svensson
There's also 'bytes', 'byte-array' and 'into-array': (byte-array (map byte [1 2 3])) (into-array Byte/TYPE (map byte [1 2 3])) // raek -- 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