delegate void noargs_func();

static noargs_func gen(out noargs_func v2set, out noargs_func v3set) {
   int bound= 1;
   v2set= () => {bound= 2;};
   v3set= () => {bound= 3;};
   return () => {stdout.puts(@"$bound\n");};
}

void main() {
   noargs_func s1, s2;
   var report= gen(out s1, out s2);
   report();
   s1();
   report();
   s2();
   report();
}
