Use `foreach` instead of `map` for side effects