Use forEach instead of map in examples

Using `map` works but returns an unused array. Don't want to teach documentation readers bad habits.