Re: primitive array casts

2013-07-20 Thread Softaddicts
tion here thanks to the cast > > >> > > >> > > Cheers, > > >> Michał > > >> > > >> > > >> On 20 July 2013 10:47, Mikera > > > > > wrote: > > >>> Do you mean > > something like (int-array [1 2 3 4]

Re: primitive array casts

2013-07-20 Thread Brian Craft
t;> > >> On 20 July 2013 10:47, Mikera > > wrote: > >>> Do you mean something like (int-array [1 2 3 4])? > >>> > >>> This is a cast-like operation that produces a primitive array of ints, > >>> exactly like int[] in Java. You can

Re: primitive array casts

2013-07-20 Thread Michał Marczyk
t; If you want to type-hint int-array parameters then you need to use something >>> like "^ints", e.g. >>> >>> (defn third-int-in-array [^ints xs] >>> (aget xs 2)) >>> >>> On Saturday, 20 July 2013 02:28:15 UTC+1, Brian Craft wrot

Re: primitive array casts

2013-07-20 Thread Michał Marczyk
2)) >> >> On Saturday, 20 July 2013 02:28:15 UTC+1, Brian Craft wrote: >>> >>> I'm unable to find any examples of primitive array casts, and the docs are >>> not helpful. Can someone point me to examples or docs that explain what they >>> do?

Re: primitive array casts

2013-07-20 Thread Michał Marczyk
ot;^ints", e.g. > > (defn third-int-in-array [^ints xs] > (aget xs 2)) > > On Saturday, 20 July 2013 02:28:15 UTC+1, Brian Craft wrote: >> >> I'm unable to find any examples of primitive array casts, and the docs are >> not helpful. Can someone poi

Re: primitive array casts

2013-07-20 Thread Mikera
ike "^ints", e.g. (defn third-int-in-array [^ints xs] (aget xs 2)) On Saturday, 20 July 2013 02:28:15 UTC+1, Brian Craft wrote: > > I'm unable to find any examples of primitive array casts, and the docs are > not helpful. Can someone point me to examples or

primitive array casts

2013-07-19 Thread Brian Craft
I'm unable to find any examples of primitive array casts, and the docs are not helpful. Can someone point me to examples or docs that explain what they do? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group