HI Jacob, I get that, but which is the reasoning behind myArray[] ? why should it return a ref to the 1st element?
------------------------------------------ Carlos On Fri, May 30, 2014 at 11:09 PM, Jacob Quinn <quinn.jac...@gmail.com> wrote: > a[] is rewritten as `getindex(a)`, which has a definition in array.jl#244 > > getindex(a::Array) = arrayref(a,1) > > -Jacob > > > On Fri, May 30, 2014 at 5:05 PM, Carlos Becker <carlosbec...@gmail.com> > wrote: > >> My apologies if this is something that was addressed before, I didn't >> find it. >> >> Why does myArray[] return the first element of the array? is there a >> reasoning behind it or is it an 'unexpected language feature'? >> For example: >> >> a = [1,2,3,4] >> a[] => returns 1 >> >> >> Thanks. >> > >