Created
July 14, 2014 02:10
-
-
Save nefftd/2564edbc8095b5e1d14d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- WITHOUT tab separators | |
local function _tsa(n,a,...) | |
if n > 0 then | |
return tostring(a),_tsa(n-1,...) | |
end | |
end | |
local function tostringall(...) | |
local n = select('#',...) | |
if n > 0 then | |
return _tsa(n,...) | |
end | |
end | |
function print(...) | |
io.stdout:write(tostringall(...)) | |
io.stdout:write('\n') | |
end | |
-- WITH tab separators | |
local function _tsa(n,a,...) | |
if n > 0 then | |
return tostring(a)..'\t',_tsa(n-1,...) | |
end | |
end | |
local function tostringall_sep(...) | |
local n = select('#',...) | |
if n > 0 then | |
return _tsa(n,...) | |
end | |
end | |
function print(...) | |
io.stdout:write(tostringall_sep(...)) | |
io.stdout:write('\n') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment