|
On 2009-12-31, steve donovan <steve.j.donovan@gmail.com> wrote:> [..snip..]
> On Wed, Dec 30, 2009 at 12:05 PM, Philippe Lhoste <PhiLho@gmx.net> wrote:
> > Perhaps the comment from ltable.c:
>
>> [..snip..]
> A map() function could easily generate lots of holes:
>
> map(tonumber,{'10','x','20','y'}) --> {10,nil,20,nil}
>
> steve d.
>
I wish that "map" would convert nil to false before pushing it into
resultant array so that it becomes {10, false, 20, false} avoiding
holes and preserving the length. Within conditionals like "if",
"while" etc nil and false are equivalent.
--Leo--