Last active
March 28, 2026 15:35
-
-
Save 0riginaln0/b3edd75580d097cd6db27082cd593421 to your computer and use it in GitHub Desktop.
Lua... why?
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
| pp = function(t) | |
| print("{ " .. table.concat(t, ", ") .. " }") | |
| end | |
| a = function() return 1, 2 end | |
| b = function() return 11, 12 end | |
| pp { a(), b(), "why?"} -- { 1, 11, "why?" } |
Author
0riginaln0
commented
Mar 28, 2026
Author
def a = return 1, 2
def b = return 11, 12
p [*a, *b, "lua"] # => [1, 2, 11, 12, "lua"]
Author
function a() { return [1, 2]; }
function b() { return [11, 12]; }
console.log([...a(), ...b(), "sucks"]); // [1, 2, 11, 12, "sucks"]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment