Inspired from this `def foreach[U](f: A => U): Unit`