Replace foreach with map | Code Walks 031

3,563 views · Published 6 September 2016 · 3:20 · Indexed 25 September 2026

Channel: Christopher Okhravi · 2016 · Education

Watch on YouTube

Higher level iterators such map, reduce, filter, reject, etc. can always be used instead of foreach. They describe WHAT to do rather than HOW. If you're not already using them, try it out! Replace all occurrences of foreach with high level iterators.

Jessica Kerr on Familiar != readable
https://youtu.be/pMGY9ViIGNU?t=2198

GEAR USED
► CAMERA: Canon 70D http://amzn.to/29wR8wG
► LENS: Canon 10-18mm http://amzn.to/29srabL
► TRIPOD: JOBY Gorillapod Zoom http://amzn.to/29AdkHT

More from this channel