This example might be clearer with a `__block` variable instead of logging, which would also demonstrate why side effects can be harmful.