andThen

trait Function1[X, Y] {
  def andThen[Z](g: (Y) => Z): (X) => Z
}

andThen は匿名関数を作成します。その関数は、受け取った値にまずこの関数を適用し、次にその値に g を適用した結果を返します。