#include <iostream>
#include <functional>
#include <initializer_list>
extern "C" void foo( std::initializer_list<int> init_lst, std::function< void(int) > fn )
{ for( const auto& i : init_lst ) fn(i) ; }
int main()
{
foo( { 0, 1, 2, 3, 4 }, [] ( int i ) { std::cout << i << ' ' ; } ) ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KI2luY2x1ZGUgPGluaXRpYWxpemVyX2xpc3Q+CgpleHRlcm4gIkMiIHZvaWQgZm9vKCBzdGQ6OmluaXRpYWxpemVyX2xpc3Q8aW50PiBpbml0X2xzdCwgc3RkOjpmdW5jdGlvbjwgdm9pZChpbnQpID4gZm4gKQp7IGZvciggY29uc3QgYXV0byYgaSA6IGluaXRfbHN0ICkgZm4oaSkgOyB9CgppbnQgbWFpbigpCnsKICAgIGZvbyggeyAwLCAxLCAyLCAzLCA0IH0sIFtdICggaW50IGkgKSB7IHN0ZDo6Y291dCA8PCBpIDw8ICcgJyA7IH0gKSA7Cn0K