LPGhatguy / roblox-lua-promise

(NO LONGER MAINTAINED) An implementation of promises akin to JavaScript's Promises/A+
Creative Commons Zero v1.0 Universal
23 stars 4 forks source link

Make multiple return values be handled correctly in all (?) cases #3

Closed LPGhatguy closed 6 years ago

LPGhatguy commented 6 years ago

Closes #1.

This code is really complicated, and I'm not sure I've got all the cases right, but the current test suite still passes.

Passing around varargs and handling nil values in the middle of sequences is really clumsy in Lua, especially when interacting with xpcall, which can't pass through extra arguments to the function it calls, which is a convenience that LuaJIT has.