[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: paving cowpaths with libraries (was Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available))
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 15 Feb 2012 12:52:50 +0200
On Wed, Feb 15, 2012 at 12:40 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Personally I prefer a multiset aka histogram: instead of `s[v]=true`,
> s[v] = (s[v] or 0) + 1
And with
s = setmetatable({},{__index = function(t,k) return 0 end})
you can reach notational nirvana
s[v] = s[v] + 1
steve d.
- References:
- Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available), Jay Carlson
- Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available), Dirk Laurie
- Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available), Jon Akhtar
- Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available), Alex Queiroz
- Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available), KHMan
- Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available), Jay Carlson
- Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available), Axel Kittenberger
- paving cowpaths with libraries (was Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available)), Jay Carlson
- Re: paving cowpaths with libraries (was Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available)), Sean Conner
- Re: paving cowpaths with libraries (was Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available)), Miles Bader
- Re: paving cowpaths with libraries (was Re: Upstream is not the last word (was Re: [ANN] Lua 5.1.5 (rc1) now available)), Dirk Laurie