I was just wondering what is this syntax - *[ key: val ] for Pbind and where is it coming from, is there any documentation for it, can it be used elsewhere and are there any drawbacks?
using a star in front of square brackets “peels off” the brackets
example:
(
var mysum = { |a, b| a + b }; // function taking two arguments
mysum.value(5,6).postln; // "normal" way of calling the function
mysum.value(*[5,6]).postln; // equivalent way of calling the function with a list instead of "loose" numbers
mysum.(5,6).postln; // actually the word "value" is optional too
mysum.(*[5,6]).postln; // equivalent
)
In the documentation it is mentioned briefly in the “Symbolic Notations” document (not sure if it appears elsewhere too).
This e.g. makes it easy to programmatically construct arguments to a function as a list.