ostream iterator instead of lambdas