just use () instead of {}
foreach(_ => printAll())