Created
August 27, 2015 19:32
-
-
Save exelotl/f50ed6c6e8d1c77324d8 to your computer and use it in GitHub Desktop.
is there a proper name for this?
This file contains 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
function pootis(f, ...) | |
local t = {} | |
for i,v in ipairs({...}) do | |
t[i] = f(v) | |
end | |
return unpack(t) | |
end | |
-- example usage | |
-- > pootis(math.floor, 1.1, 2.2, 3.3, 4.4) | |
-- 1 2 3 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment