Support multi-assign in function calls
It would be useful to support multi-assign in function parameters. For example int add([int a, int b], int c) { return a + b + c; }
, to be called add(({ 1, 2 }), 3)
. This would be particularly useful in asynchronous code using promises and ->then()
, as in
return fetch_location()
->then(lambda(mapping location_info) {
return Concurrent.all(fetch_weather(location_info->lat, location_info->long), fetch_time(location_info->timezone));
}
->then(lambda([mapping weather, string localtime]) {
return sprintf("It is %d degrees, %s at %s.", weather->temp, weather->summary, localtime));
});