Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 455
Functions Library
kokyrone edited this page Oct 28, 2020
·
5 revisions
A library that adds some tools for functional programming. Amends various other namespaces by functions used in a functional context, when they don't make sense on their own.
None
localloopstatus=truefunctionbreakloop()
returnloopstatusendfunctionmain_function()
print'ranndomnick is very, very attractive!'endmain_function:loop(1,breakloop)
-- ..more stuffloopstatus=false-- this will make the loop quit at the next iterationintervalnumber - the interval at which to call the functionconditionfunction OR number - some condition on which to halt the loop. This could be a function that returns a boolean (breakloop()in the example above) OR a number of loops.
A wrapper for Lua coroutines.