wdte: add support for variadic arguments
GoFuncs can already deal with their arguments however they want to, but functions declared in WDTE have no support for variadic arguments.
The plan, therefore, is to add support for a var, or maybe variadic, funcmod that indicates that the it takes any number of arguments. Any argument after the second to last is passed in place of the last argument as an array. In other words,
let a => import 'arrays';
let s => import 'stream';
let variadic example a b c => a.stream c -> s.reduce 0 (@ s p n => + a b p n);
example 1 2 3 4 5 -> io.writeln io.stdout;
would print 46.
A feature that could be useful along with this that needs some planning is the ability to pass an existing array as the variadic list. This might require a new operator, but it also might be possible to reuse the var or variadic keyword as way of specifying the usage. For example, given the above example 1 2 3 variadic [4; 5] -> io.writeln io.stdout would also print 46.