WurstScript
WurstScript copied to clipboard
Add inline closure declarations
Instead of having to make an interface or abstract class, just allow specifying the input and output type to get a functional type. So instead of this:
interface MyClosure1
function run(real r) returns int
interface MyClosure2
function run() returns int
function foo1(MyClosure1 clsr)
function foo2(MyClosure2 clsr)
This
function foo1((real -> int) clsr)
function foo2((nothing -> int) clsr)