[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Requesting Suggestions for intermediate/advanced book on Lua
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 7 Oct 2013 06:57:53 +0200
On Sun, Oct 6, 2013 at 10:23 PM, Jay Glascoe <jay.glascoe@gmail.com> wrote:
> I think normally I would do something like "map(theFunction, theList)"
> whereas Underscore has "map(theList, theFunction)". What's cool about that,
> in Lua, is if your your list (table) is an object with "map" to be found
> somewhere in it's metatable's index, you can do "myObject:map(theFunction)"
Yep, I went through that as well with Penlight - so it works both
ways: there is tablex.imap (fn,t) (where t is a array-like table) but
the List class has a map method: ls:map(fn).
List is not really the right word but it comes from the early
lets-clone-Python stages of Penlight.
- References:
- Requesting Suggestions for intermediate/advanced book on Lua, Jay Glascoe
- RE: Requesting Suggestions for intermediate/advanced book on Lua, Thijs Schreijer
- Re: Requesting Suggestions for intermediate/advanced book on Lua, steve donovan
- Re: Requesting Suggestions for intermediate/advanced book on Lua, Jay Glascoe
- Re: Requesting Suggestions for intermediate/advanced book on Lua, Steven Johnson
- Re: Requesting Suggestions for intermediate/advanced book on Lua, Steve Litt
- Re: Requesting Suggestions for intermediate/advanced book on Lua, Jay Glascoe
- Re: Requesting Suggestions for intermediate/advanced book on Lua, H. Conrad Cunningham
- Re: Requesting Suggestions for intermediate/advanced book on Lua, Jay Glascoe
- Re: Requesting Suggestions for intermediate/advanced book on Lua, H. Conrad Cunningham
- Re: Requesting Suggestions for intermediate/advanced book on Lua, Jay Glascoe