[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua Short Reference, 2nd draft
- From: Thomas Lauer <thomas.lauer@...>
- Date: Fri, 15 Feb 2008 09:57:28 +0000
Ben <thebassplayer@gmail.com> wrote:
> My only suggestion: in the "Pattern Matching" section, the last
> entry, `string.gsub("Lua is great!", "^.-a", function (s) return
> string.upper(s) end)` is much more simply put as `string.gsub("Lua is
> great!", "^.-a", string.upper)`.
You're of course right. However, I think that the explicit "function ...
end" makes clearer (at least to a casual reader) the point that one can
use functions as a parameter there.
--
cheers thomasl
web: http://thomaslauer.com/start