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]
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
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
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?
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
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
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