not use Traversable but use  { def foreach[U](f: A => U): Unit } instead