lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



Without 'pairs' and 'ipairs' I'd agree with you.
Now the border is fuzzy, but perhaps it needs to be somewhere..

Other globals I'd like to have (and I do, but as standard for everyone):

	function first(x) return x end
	function second(_,x) return x end
	function third(_,_,x) return x end

In fact, here's my whole libext.lua file, which is my "wish list" for tomorrow:

	

Attachment: libext.lua
Description: Binary data



If Lua starts carrying those things, this file will naturally demenish. :)

-ak


28.7.2004 kello 03:15, Jamie Webb kirjoitti:

 On Wed, Jul 28, 2004 at 02:32:58AM +0300, Asko Kauppi wrote:
It's not the question it couldn't be done (I already did, with a clumsy
for loop).  It's a question on how cleanly it could be done.  Sorry to
say :) but your example looks like Perl.. (no offense)

True, but wouldn't it also be a Perlism to include such a redundant
function? Possibly string.lines has a place in stdlib, but enlarging
the built-in libraries to help a few people avoid typing a one-liner
doesn't seem right.

-- Jamie Webb