[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A question about table's length
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 31 Dec 2009 19:33:33 +0200
On Thu, Dec 31, 2009 at 3:44 PM, Leo Razoumov <slonik.az@gmail.com> wrote:
> 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.
So 'false' becomes a way to represent holes? But I don't see why it is
crucial to preserve length of the result. Also, even if in principle
the result is all of one type, it ends up in general as a mixture of
booleans and that type. There could be another operation which will
explicitly remove all occurances of a value, so my desired result is
something like map(strs,tonumber):remove_values(false)
steve d.
- References:
- A question about table's length, h visli
- Re: A question about table's length, Klaus Ripke
- Re: A question about table's length, h visli
- Re: A question about table's length, Klaus Ripke
- Re: A question about table's length, Vaughan McAlley
- Re: A question about table's length, David Manura
- Re: A question about table's length, steve donovan
- Re: A question about table's length, Philippe Lhoste
- Re: A question about table's length, steve donovan
- Re: A question about table's length, Leo Razoumov