Jos van Uden:
But I couldn't figure out how to expand the boolean array to an argument list.
I wrote a version, it's more statically type safe, but the code is quite hairy, and the foreach(i) generates too many templates if the predicate has many bool arguments:
http://codepad.org/9Ar1pmMc Are you able to improve it?
The Go example uses runtime reflection, I believe.
I'd like a bit more reflection in D, to avoid a similar jungle of templates :-)
I think Rosettacode is currently down. Bye, bearophile